What is bounded height in ScrollView?
Asked Answered
S

1

9

What does it mean? (https://facebook.github.io/react-native/docs/scrollview)

Keep in mind that ScrollViews must have a bounded height in order to work

Who has to have so called bounded height? ScrollView itself? or its very parent? Or its child?

<SafeAreaView style={{height: ...}}> <= this?
    <ScrollView style={{height: ...}}> <= this?
        <View style={{height: ...}}> <= this?
            ....
        </View>
    </ScrollView>
</SafeAreaView>
Shamble answered 12/7, 2018 at 10:46 Comment(3)
it means the inner view inside of the ScrollView should have a height of its own filled data! WRAP CONTENTSmithers
@Rizwanatta, what does it mean a height of its own?Shamble
ScrollView is a generic view that depends upon the height go the screen in which it is being rendered! and in ScrollView it takes only one Child Whose height should be wrapContent.Smithers
A
0

As far as i know its height of parent of ScrollView.

<SafeAreaView style={styles.container}>
  <ScrollView style={styles.scrollView}>
     ......
     ......
  </ScrollView>
</SafeAreaView>

const styles = StyleSheet.create({
     container: {
       flex: 1,
     },
Amianthus answered 5/4, 2023 at 4:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.