ListView sets the first visible position

In ListView, I can get the index of the first item displayed using the getFirstVisiblePosition () method. How can I set the item at a specific index to display in the first position - I need something like setFirstVisiblePosition (int index)

+8
android set listview position
source share
1 answer

You can use setSelection(index) so that the display switches to the index you need.

+24
source share

All Articles