Skip to content

The demo project which shows the implementations of paginated lists based both on the ListView and RecyclerView

Notifications You must be signed in to change notification settings

Stanislav-Perchenko/lists-pagination-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project demonstrates the UI part implementation of paginated lists. The two implementations are included. One for RecyclerView and another one for ListView. Both implementation uses some shareable code and resources for "load more" list item.

Pagination is implemented on adapter level. For the ListView case the "decorator" pattern is used by the wrapper-adapter, which manages "load more" view item and may be applied to any descendant of BaseAdapter. The same approach is used in the SDK to support Headers/Footers (by the HeaderViewListAdapter).

For the RecyclerView case the abstract descendant of the RecyclerAdapter is implemented to support "Load more" logic. This adapter must be extended by a final adapter implementation.

The project is splited on several modules. Module "listpagination" contains all classes and resources which essentially implement pagination pagination pattern: PaginatedListAdapter, PaginatedRecyclerAdapter, LoadMoreView.

The main "app" module contains launcher screen and demo framework for the paginated lists, which includes:

  • demo activities (BaseDemoActivity, ListPaginationDemoActivity, RecyclerPaginationDemoActivity)
  • demo adapters (MyListInnerAdapter, MyPaginatedRecyclerAdapter)
  • test data source (ListItemModel, PaginatedPresenter, DelayedDataSourceEmulator, CommunicationErrorEmulator).

This project also demonstrates the implementation of MVP application architecture pattern see combination of:

  • LauncherActivity + LauncherActivityPresenter + LauncherScreenView
  • ListPaginationDemoActivity + RecyclerPaginationDemoActivity + IPaginatedListView+PaginatedPresenter)

It also demonstrates using of the Android Data binding library:

  • LauncherActivity + activity_launcher.xml
  • LauncherAdapter + layncher_list_item.xml

About

The demo project which shows the implementations of paginated lists based both on the ListView and RecyclerView

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages