https://github.com/zunjae/bunpaginate
Most basic RecyclerView pagination ever
https://github.com/zunjae/bunpaginate
Last synced: 8 months ago
JSON representation
Most basic RecyclerView pagination ever
- Host: GitHub
- URL: https://github.com/zunjae/bunpaginate
- Owner: zunjae
- Created: 2019-05-05T14:16:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-17T07:32:11.000Z (over 6 years ago)
- Last Synced: 2025-09-09T13:55:41.407Z (9 months ago)
- Language: Kotlin
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BunPaginate
* Add pagination to your RecyclerView
1) Include the BunPaginate.kt file into your project
2) Create an instance of `BunPaginate` like this
```kotlin
paginator = object : BunPaginate(recyclerViewShows) {
override fun isLastPage(): Boolean {
// return a variable which determines whether you're on the last page
}
override fun isLoading(): Boolean {
// return a variable which determines whether data is being loaded
}
override fun loadMore(pageNumber: Int) {
// load more data
}
}
```
3) Attach the Paginator to the RecyclerView
```
recyclerView.addOnScrollListener(paginator)
```
## License
This project is available under the MIT license, though there is no need to include a license and copyright notice