Does ListView get scroll position?

I am using MergeAdapter (Mark Murphy has an excellent series of projects). You use it with a ListView. I am trying to rebuild the contents of the adapter when updating (instead of updating in-place and calling notifyDataSetChange ()).

I would like to get the y-scroll value for the list so that I can reset after I rebuilt my list. Does this seem impossible?

thanks

+6
source share
1 answer

Deploy OnScrollListener for your list.

@Override public void onScroll(AbsListView absListView, int firstVisible, int visibleCount, int totalCount) { //firstvisible is your first visible item in the list } 
+1
source

Source: https://habr.com/ru/post/917255/


All Articles