Skip to content

ScrollView cannot scroll its content #14164

@Chandhru08

Description

@Chandhru08

Description

When i included components into ScrollView, it doesnt scrolls the content.

Reproduction Steps and Sample Code

videotogif_2017 05 25_02 42 24 1

Step1: Try to scroll the contents up and down
Step2: When srolling the child components, it works

Code:

<View>
      <View style={descriptionContainerStyle}>
        <View>
            <Text style={{ paddingLeft: 5 }}>Brand</Text>
            <Text style={{ paddingLeft: 5 }}>Name</Text>
            <Picker
            style={{ width: 200 }}
            selectedValue={dummy}
            onValueChange={value => dummy({ value })}
            mode="dropdown"
            >
            <Picker.Item label="1kg" value="1kg" />
            <Picker.Item label="2kg" value="2kg" />
            <Picker.Item label="3kg" value="3kg" />
          </Picker>
        </View>
        <View style={innerContainerStyle}>
          <View style={priceTextStyle}>
            <Text>Rs 13 off</Text>
            <Text>Rs 100</Text>
          </View>
          <View>
            <Text> Rs 87 </Text>
          </View>
          <View>
            <Button> Add </Button>
          </View>
        </View>
      </View>
          <ScrollView>
                    <GaleryCarousel
                    data={imagesDemo}
                    joinFirst={'http://i.imgur.com'}
                    defaultImageIndex={0}
                    onLongPress={(key, element) => { console.log(key, element); }}
                    />
                    <TabBarNav />
                    <Text> Hi</Text>
                    <Text> Hi</Text>
                    <Text> Hi</Text>
                    </ScrollView>
    </View>

Note: I deleted some Hi text components.

Solution

Kindly let me know the solution.

Additional Information

  • React Native version: 0.44.0
  • Platform: Android
  • Development Operating System: Windows
  • Dev tools: I build with cmd line code 'react-native run-android'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions