react-native - React Native ScrollView 不会以最基本的格式滚动^^
问题描述
这是第一次使用 ScrollView,在没有设法让它在我需要的屏幕上工作之后,我制作了新组件只是为了对其进行测试,当我刷新它时,它会在一瞬间在侧面显示滚动条,然后“长度”看起来适合我添加的行数,但我无法滚动它。这就是我的测试的样子^^我做错了什么?将不胜感激
<View style={{flex: 1}}>
<ScrollView>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
<Text style={{paddingVertical: 30, backgroundColor: 'orange', marginVertical: 10}}>hello</Text>
</ScrollView>
</View>
)
解决方案
推荐阅读
- javascript - 如何在本机反应中创建动态下拉选择器
- react-native - 使用 npx react-native start 命令出错
- azure - 使用按钮发送天蓝色推送通知
- flutter - 如何在我的 listview.builder 完成构建列表视图之前显示进度指示器
- pine-script - 在策略循环中保存变量(Pine 脚本)
- python - Python Docker SDK对容器的长命令
- react-native - OnPress State 通过 AsyncStorage 更新屏幕不会重新渲染
- svelte - 如何在 Svelte 中直接挂载 HTMLElement?
- angular - 用角度理解 Oauth2 流
- c - 如何使用 gcc 添加 tls 回调函数?