This library is used in the Android native engine of GoodBarber. It handles Android RecyclerViews items removing boilerplate code and automatically manage the different types of elements on the List.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Android minSdkVersion: 16
On root of the project change the file build.gradle
and add this line on repositories:
allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } }
On <ProjectName>/src/builde.gradle
add this line on dependencies:
compile 'com.github.goodbarber:android_GBRecyclerIndicator:1.1.5'
Now it's ready to use the GBRecyclerIndicator lib. You can also check our sample.
The main feature on this library is to you easily manage all items displayed on your RecyclerView. Here you can easily have multiple columns and different number of columns in each line of the list. Manage dynamically the items content and persisting the current status of the item without using any hack on the view or model data, because here we use a middle layer between the Adapter and the View to be displayed on the RecyclerView that we call GBRecyclerIndicator. With this GBRecyclerIndicator you can easily do this:
- Have multiple and differentiated number of columns in each line
- Easily handle different view types to be displayed on the RecyclerView
- Persist current status on the indicator (when the view is reused, then we can replace the current status of the item when it's visible again)
- Pager effect on Horizontal RecyclerView
Example Vertical List with multiple columns:
Example Horizontal List inside of a Vertical List:
We also published a sample project in this repository for you to easily try our library.