Skip to content

This is an attempt to make RecyclerView more easier to use. The custom Adapter implements loading view when loading data, error view when error occurs and load more view when having more data.

Notifications You must be signed in to change notification settings

shadowsong91/RecyclerView-Adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RecyclerView-Adapter

This is an attempt to make RecyclerView more easier to use. The custom Adapter implements loading view when loading data, error view when error occurs and load more view when having more data.

How to use

  1. Implement BaseViewAdapter and override onCreat**(exclueded onCreateViewHolder) function. Override useErrorHolder() (just return true)if you want a error view when error occurs. Override usePlaceholder() (just return true)if you want a placeholder when data is not prepared. And you can set view count by overriding getErrorHolderCount and getPlaceholderCount.
  2. Use a ListWrapper to load data.
  3. Set ListWrapper to your adapter.
  4. ListWrapper.load().

Screen shot

Data not prepared:
image
Loading failed:
image
Loading more failed:
image

Example

See MainActivity.java

About

This is an attempt to make RecyclerView more easier to use. The custom Adapter implements loading view when loading data, error view when error occurs and load more view when having more data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages