开发者

how to prevent position goes top after adding items into listview, and notifyDataSetChanged

开发者 https://www.devze.com 2023-03-17 11:50 出处:网络
messages.addAll(0,lstLoadedTop10); adapter.notifyDataSetChanged(); the problem is. after I add items into listview and doing notifyDataSetChanged();
    messages.addAll(0,lstLoadedTop10);

    adapter.notifyDataSetChanged();

the problem is.

after I add items into listview and doing notifyDataSetChanged();

the scrollbar goes top.

but I want to watch items on sc开发者_StackOverflowreen continuously.

for example. at the twitter app, the position doesn't goes up after loading more twit.

sorry about my poor English. thanks in advance.


If you are using ScrollView , it will be easy.

Try this: scrollTo(int x, int y). Read more here

Good Luck

0

精彩评论

暂无评论...
验证码 换一张
取 消