我使用ScrollView组件在ScrollView(主屏幕)如GIF文件所示.问题是,这个scrollView是在iOS上工作,但不是在Android侧.在Android手机上,它卡住了,不滚动.
ScrollView组件
<ScrollView style={{maxHeight:100,width: widthPercentageToDP('70%')}}>
<View style={{ flexDirection: 'row', flexWrap: 'wrap', alignItems: 'flex-start', justifyContent: 'flex-start', marginBottom: 10 }}>
{items?.map((item) => {
return <View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center', backgroundColor: '#e2cbff', paddingVertical: 6, paddingHorizontal: 10, marginTop: 10, marginRight: 10, borderRadius: 20, borderWidth:0.5, borderColor:'#461584'}}>
<Text style={{ fontSize: 11, color: '#461584' }} >{item[itemKey]}</Text>
</View>
})}
</View>
</ScrollView>
使用组件的主屏幕视图。
<View>
<Text style={styles.personalInfoTitle}>Skills/Experties</Text>
<ChipList items={profile?.expertises} itemKey='name'/>
</View>
1条答案
按热度按时间3pmvbmvn1#
尝试以下选项,