https://github.com/anitaa1990/paginglib3-sample
A simple demo project for demonstrating the Paging3 library with Jetpack Compose.
https://github.com/anitaa1990/paginglib3-sample
android android-app android-application android-studio android-ui jetpack-compose kotlin kotlin-android kotlin-coroutines kotlin-flow mvvm-architecture paging-library paging-library-in-android paging3
Last synced: 8 months ago
JSON representation
A simple demo project for demonstrating the Paging3 library with Jetpack Compose.
- Host: GitHub
- URL: https://github.com/anitaa1990/paginglib3-sample
- Owner: anitaa1990
- Created: 2024-06-12T05:47:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-06T04:10:31.000Z (9 months ago)
- Last Synced: 2025-01-06T05:17:42.088Z (9 months ago)
- Topics: android, android-app, android-application, android-studio, android-ui, jetpack-compose, kotlin, kotlin-android, kotlin-coroutines, kotlin-flow, mvvm-architecture, paging-library, paging-library-in-android, paging3
- Language: Kotlin
- Homepage:
- Size: 21.7 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PagingLib3-Compose
A simple demo project for demonstrating the Paging3 library with Jetpack Compose. More details on how to implement Paging3 library with Jetpack Compose can be found [here](https://devanddroid.com/2024/11/20/5-steps-to-use-paging3-library-with-jetpack-compose/).
![]()
### App Features
• Users can view the latest news from the [news api](https://newsapi.org/).
• Users can also search for any news from the api.
• Supports pagination so you can literally view all news from around the world in the last 5 years.#### App Architecture
Based on mvvm architecture and repository pattern.#### The app includes the following main components:
* A web api service.
* Pagination support for data received from the api.
* A repository that works with the api service, providing a unified data interface.
* A ViewModel that provides data specific for the UI.
* The UI, using Jetpack Compose, which shows a visual representation of the data in the ViewModel.
* Unit Test cases for API service and Paging source.#### App Packages
* data - contains
* remote - contains the api classes to make api calls to MovieDB server, using Retrofit.
* local - contains the db classes to cache network data.
* repository - contains the repository classes, which acts as a bridge between the db, api and the paging classes.
* source - contains the remote mediator and paging source classes, responsible for checking if data is available in the db and triggering api requests, if it is not, saving the response in the database.
* module - contains dependency injection classes, using Hilt.
* ui - contains compose components and classes needed to display movie/tv list and movie/tv detail screen.
* util - contains util classes needed for compose redirection, ui/ux animations.