Skip to content

Latest commit

 

History

History

lib-easyadapter-pagination

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

EasyAdapter Pagination

This module contains a class for adapter of list with pagination which is based on EasyAdapter.

Usage

Gradle:

    implementation "ru.surfstudio.android:easyadapter-pagination:X.X.X"

The main idea is based on PaginationState which describes all possible states during pagination.

All you need is to create your implementation of BasePaginationFooterController and pass its instance to EasyPaginationAdapter constructor. In the same way you can pass a listener for loading next page.

Sample BasePaginationFooterController implementation

Also you can change logic for checking if it's needed to show more elements, see EasyPaginationAdapter.shouldShowMoreElements

The rest usage is just the same as usage of EasyAdapter.

Sample