android - ScrollView not scrolling properly?
问题描述
There is a ScrollView in my functional component. I am using an android phone connected to my laptop so that I can see the changes in the phone.
Problem:
When I slide on the right side of the phone screen the page scrolls. But when I slide at the center or left side of the phone screen the page does not scroll properly. The page bounces to the top and bottom.
This is my minimalistic code:
return (
<TouchableWithoutFeedback style={{ flex: 1 }} onPress={Keyboard.dismiss}>
<SafeAreaView>
<Header title="Organizations" navigation={props.navigation} />
<ScrollView>
<Block mb={spacing.huge}>
<Card>
......
<FlatList
.....
/>
......
</Card>
</Block>
</ScrollView>
</SafeAreaView>
</TouchableWithoutFeedback>
)
I am getting this error in console:
WARN VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.
Does anyone know how to solve this problem?
解决方案
nestedScrollEnabled
我在里面使用了这个道具ScrollView
。
推荐阅读
- asp.net-mvc - 表中的 ASP.NET MVC 填充下拉列表
- php - foreach 循环将字符串添加到特定值
- arrays - Select-Object -Unique 返回字符串而不是字符串数组
- list - 无法将预期类型“[Integer]”与实际类型“Bool”匹配
- spring - 如何在 spring mvc 控制器中正确配置日期序列化
- swift - 看不到 UIView 的 UIView 子视图
- powershell - 无法连接到远程服务器
- java - 尝试将数组中大于 45 的任何值更改为 32 并计算它改变了多少
- css - 如何在 Internet Explorer 中正确使用 CSSStyleSheet.insertRule()?
- jenkins - 当“执行命令”使用“cmd /c”时,Jenkins 挂起