ScrollView中嵌套listview时,当listview自动加载时,会自动滑动到scrollview到底部。
在ListView加载数据完成时候:
list_view.post { scrollView.smoothScrollTo(0,0)}
在ListView的父节点上添加属性:
android:descendantFocusability="blocksDescendants"
本文分享自 作者个人站点/博客 前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体同步曝光计划 ,欢迎热爱写作的你一起参与!