react-native - 无法滚动绝对位置内的 ScrollView
问题描述
我有下面的代码。内容在 Scrollview 内显示但不可滚动。
以前有人过期吗?非常感谢任何帮助。
这发生在什么平台上?安卓
SDK 版本(仅限托管工作流) 无响应
环境系统:操作系统:Windows 10 10.0.19041 二进制文件:节点:14.16.1 - C:\Program Files\nodejs\node.EXE npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD IDE:Android Studio 4.1.3 Build #AI-201.8743.12.41.7199119,构建于 2021 年 3 月 11 日运行时版本:1.8.0_242-release-1644-b01 amd64 VM:JetBrains sro npmPackages 的 OpenJDK 64 位服务器 VM:“react”:“ 17.0.1", "react-native": "0.64.0", 设备: Xiaomi Note 8 Pro
return (
<View style={
flex: 1,
flexDirection: 'column',
backgroundColor: 'black',
}>
Icon
containerStyle={{
position: 'absolute',
top: 30,
right: 15,
zIndex: 2,
backgroundColor: '#fff',
borderRadius: 5,
}}
name="arrow-drop-up"
size={35}
onPress={() => this.setState({ isTextsVisible: false })}
/>
<View style={{
position: 'absolute',
top: 30,
left: 0,
zIndex: 1,
flex: 1,
}}>
<ScrollView contentContainerStyle={{
flexWrap: 'wrap',
flexDirection: 'row',
alignItems: 'flex-start',
height: SCREEN_HEIGHT / 2,
}}>
{
texts.map((text, i) => {
this.tagRef[i] = null;
return (
<View
key={i}
ref={c => this.tagRef[i] = c}
><Tag
text={text.value}
onPress={() => this.onTextPress(text.value, i)}
/></View>
)
})
}
</ScrollView>
</View>
</View>
);