Firebase android pagination

后端 未结 10 1504
天命终不由人
天命终不由人 2020-11-28 09:14

I\'m building an app which will show videos stored on firebase. The list of videos needs to be paginated fetching most recent 20 videos at a time.

Here is

10条回答
  •  渐次进展
    2020-11-28 09:32

    Android paging library can be used to implement pagination for data fetched from firebase database. Data is displayed in recycler view and paging component fetches pages in response to user scroll events.

    Paging data source calls your firebase DAO object passing query parameters for the page to be displayed and results are passed back to paging component using callback provided to it.

    Here is a complete example for reference http://www.zoftino.com/firebase-pagination-using-android-paging-library

提交回复
热议问题