KaratasFurkan / pagination-demo-android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Impelementing Pagination in Android

This is a sample android app to show how to implement pagination to an android app.

This project aims to teach how to implement pagination to an android app. There are various solutions for pagination, and one of them is to use Paging 3 Library. It is easy to implement, and compatible with various devices. Also, this example demonstrates how to implement pagination for fetching data from an API that supports pagination. It is also possible to implement pagination to other data sources, but it is not the focus of this demo.

About the application

This is a demo app to show passengers on a flight. They are displayed in two different recyclerviews (one vertical, and one horizontal). The data is fetched from a passenger API which supports pagination. The endpoint requires page and page size as parameters that are easily calculated and provided to the endpoint with the help of the paging library.

Screenshots

Documentation

1 - Paging 3: The Paging Library helps you load and display pages of data from a larger dataset from local storage or over network. This approach allows your app to use both network bandwidth and system resources more efficiently. Link -> Paging 3.0

2- Fake Rest API: This API is used to fetch the data of passengers. It is a fake data provider API that supports pagination. -> Link Passenger API

Tutorial Video

There is also a very short tutorial video for this project in which implementation is explained. So in case of any kind of need to understand the project, just go and check out the video and leave a comment if you still have something unclear in your mind. Link -> Youtube video

About


Languages

Language:Kotlin 100.0%