admin管理员组文章数量:1404337
I was unable to scroll to the bottom when using the following configuration:
<View> <-View1
<View> <-View2
<Text>a</Text>
(...5lines)
</View>
<ScrollView>
<Text>1</Text>
<Text>2</Text>
(...70lines)
</ScrollView>
</View>
The same number of lines in View2, the end in ScrollView is not visible.
I've looked into it but I only found hard-coded solutions like padding-bottom. In the first place, it's strange that the end is hidden, so I would like to know how to scroll correctly to the end.
※I'm Japanese. I'm using a translation tool, but I'm sorry for my poor English.
I was unable to scroll to the bottom when using the following configuration:
<View> <-View1
<View> <-View2
<Text>a</Text>
(...5lines)
</View>
<ScrollView>
<Text>1</Text>
<Text>2</Text>
(...70lines)
</ScrollView>
</View>
The same number of lines in View2, the end in ScrollView is not visible.
I've looked into it but I only found hard-coded solutions like padding-bottom. In the first place, it's strange that the end is hidden, so I would like to know how to scroll correctly to the end.
※I'm Japanese. I'm using a translation tool, but I'm sorry for my poor English.
Share Improve this question asked Mar 11 at 15:06 user29964711user29964711 111 bronze badge 3- is this the solution you want ? :snack.expo.dev/MiPBnEgUGRjJOR6HYI-JM – Suppose Commented Mar 13 at 9:08
- you need to set style with flex:1 to component – Suppose Commented Mar 13 at 9:10
- This was achieved by add style flex:1. Thank you!!! – user29964711 Commented Mar 18 at 5:08
1 Answer
Reset to default 1This was in the comments section, but I'll post it here as well.
Thank you @Suppose!
This was achieved by add style flex:1
.
<View style={{ flex:1 }}>
<View>
<Text>a</Text>
(...5lines)
</View>
<ScrollView>
<Text>1</Text>
<Text>2</Text>
(...70lines)
</ScrollView>
</View>
本文标签: androidCan39t scroll to the end of a Component in a ScrollViewStack Overflow
版权声明:本文标题:android - Can't scroll to the end of a Component in a ScrollView - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744785816a2624992.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论