reactjs - 反应原生 ScrollView 不滚动而没有任何错误
问题描述
<ScrollView contentContainerStyle={styles.list}>
{pastGuesses.map((guess, index) => renderListItem(guess, pastGuesses.length - index))}
</ScrollView>
listContainer: {
flex: 1,
width: '80%'
},
list: {
flexGrow: 1,
alignItems: 'center',
justifyContent: 'flex-end'
},
listItem: {
borderColor: "#ccc",
borderWidth: 1,
padding: 15,
marginVertical: 10,
backgroundColor: "#fff",
flexDirection: 'row',
justifyContent: 'space-around',
width: "60%"
}
在这里,我在本机反应中使用 ScrollView。这是我的代码。但是,不幸的是,滚动不起作用。我没有收到任何错误,但 scorll 没有发生。
请看一下
解决方案
推荐阅读
- matlab - Total number of pages in a PDF document
- javascript - 如何检查和拆分二进制中的整数前缀?
- java - 在 Spark Java 中将超过 22 列传递给 UDF
- unity3d - Unity3D- BlendOp LogicalOr
- exception - A simple and general way to handle all Netty asynchronous outbound exceptions without calling sync() or adding listeners for each operation?
- javascript - Failed on Trying to fetch JSON object using XMLHttpRequest and resulted in empty quotation
- angular - Angular 7 - Multiple Dropdowns Selection Change
- php - Laravel load more not working as expected
- python - 这个解决方案的时间复杂度是 O(logn) 吗?
- neo4j - 有什么方法可以过滤掉 Neo4J APOC 请求中最常见的术语?