When I apply {alignItems: 'center', justifyContent: 'center'}
to style
prop, got following error,
ScrollView child layout must be applied through the
contentContainerStyle prop
then applied same styling to contentContainerStyle
and worked fine. I am unable to understand the basic difference between style
and contentContainerStyle
and when to use them.
I am assuming that when ScrollView
is called, two views
are called. style
applicable to parent View
and contentContainerStyle
applicable to child View
.
Please correct me if I am wrong. Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…