to Paging Data

fun <data : Any> toPagingData(pageSize: Int, action: (Int) -> Single<List<data>>): Flowable<PagingData<data>>

Method to convert API call to Pager

Return

Flowable for the data to subscribe

Parameters

data

data object from the pagination list

pageSize

how many items that are loaded for each page

action

the API call with pagination

Sources

Link copied to clipboard