简体   繁体   English

防止ListView滚动到notifyDAtaSetChanged的顶部

[英]Prevent ListView Scroll to top on notifyDAtaSetChanged

I'm using a listView that gets notifyDataSetChanged() called every few seconds and if user is scrolling down, he's automatically scrolled to top. 我使用的listView每隔几秒钟就会调用一次notifyDataSetChanged(),如果用户向下滚动,他会自动滚动到顶部。

What could be the reason? 可能是什么原因? I've not used any .setSelection(0), or other methods that force scrolling. 我没有使用任何.setSelection(0)或其他强制滚动的方法。 What could I be doing wrong? 我可能做错了什么?

使用CursorAdapter填充listview,问题消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM