I have an implementation of Paging 3 with network + DB configuration; where the RecyclerView is inside the SwipeRefreshLayout.
I have given the paging config as this.
const val API_RESPONSE_DATA_SIZE = 50
val PAGED_LIST_CONFIG = PagingConfig(
initialLoadSize = API_RESPONSE_DATA_SIZE * 2,
pageSize = API_RESPONSE_DATA_SIZE,
prefetchDistance = API_RESPONSE_DATA_SIZE,
enablePlaceholders = false
)
for eg: I have a dataset of 700+ items on initial it should ideally call load(0) & load(50) to fetch 100 items. But it is calling load(100), load(150) and so on.... without scrolling the recycler view.