Monday 23 November 2020

Android PagedList Scroll to bottom

I'm using Android Jetpack Paging library(2.1.2) for a chat view. Data is served from a local database(room) and network by using PagedList.BoundaryCallback mechanism. Since the Room provide paged data to the RecyclerView adapter I'm unable to scroll to the bottom of list as the list size is unknown.

I also registerd registerAdapterDataObserver for adapter to observe the changes. However itemCount value in onItemRangeInserted callback changed from time to time.

So how do you guys scroll to bottom of the RecyclerView when you are using PagedListAdapter with BoundaryCallback ?



from Android PagedList Scroll to bottom

No comments:

Post a Comment