开发者

How to use move to selected items in listview in android?

开发者 https://www.devze.com 2023-02-28 21:54 出处:网络
I have a listview. Which is refreshed when reached at the end of the list. Bu开发者_StackOverflowt when list is refreshed the selection reset and first item shows selected. So have used setSelection(s

I have a listview. Which is refreshed when reached at the end of the list. Bu开发者_StackOverflowt when list is refreshed the selection reset and first item shows selected. So have used setSelection(selectedItem), it makes that row selected but moved it top of the screen. I want it should remain at the bottom. How to achieve this?


Try using smoothScrollToPosition (int position);

This will make the listview scroll to the position of the item. Click here for more info;

0

精彩评论

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