React native 物料底部选项卡上的滚动视图不工作
当前行为 我创建的标签如下(注意:主页是一个StackNavigator屏幕): ProfileTab以这种方式呈现(项是一个输入数组):React native 物料底部选项卡上的滚动视图不工作,react-native,react-navigation,react-navigation-stack,react-navigation-bottom-tab,React Native,React Navigation,React Navigation Stack,React Navigation Bottom Tab,当前行为 我创建的标签如下(注意:主页是一个StackNavigator屏幕): ProfileTab以这种方式呈现(项是一个输入数组): 返回 Bem vindo,{RNStorage.userProfile.user.givenName} {items} 所有输入均遵循此结构: 当前有此行为(不滚动): 预期行为 滚动应该正常工作。我还使用react native手势处理程序的ScrollView进行了测试,但它也不起作用。这与材质底部选项卡无关 您需要从contentContain
返回
Bem vindo,{RNStorage.userProfile.user.givenName}
{items}
所有输入均遵循此结构:
当前有此行为(不滚动):
预期行为
滚动应该正常工作。我还使用react native手势处理程序的ScrollView进行了测试,但它也不起作用。这与材质底部选项卡无关 您需要从
contentContainerStyle
中删除flex:1
。否则,您的视图将填充可用的可滚动区域,并且不可滚动
return <ScrollView contentContainerStyle={{flex: 1, backgroundColor: Colors.primaryShade3,
paddingTop: Sizes.paddingTop}}>
<View style={{flexDirection: "row", alignItems: "center", marginBottom: 50}}>
<Image source={{uri: RNStorage.userProfile.user.photo}}
style={{marginRight: 20, resizeMode: "contain", width: 70, height: 70, borderRadius: 50}}/>
<Text style={{color: Colors.white, fontSize: Sizes.h2}}>
Bem vindo, {RNStorage.userProfile.user.givenName}
</Text>
</View>
{items}
</ScrollView>