A RecyclerView's divider that can be customized with simple properties or advanced ones.
It supports:
LinearLayoutManager
(completely)GridLayoutManager
(completely)StaggeredGridLayoutManager
(partially)
A basic version of the divider can be attached to a RecyclerView
through this line:
RecyclerViewDivider.with(context).build().addTo(recyclerView);
Each divider can be customized with various properties. These properties can have a common value for every divider or a specific value related to a divider instance.
For further information, check the wiki.
Android SDK: RecyclerViewDivider requires a minimum API level of 14 (the same of RecyclerView).
AndroidX: this library requires AndroidX. To use it in a project without AndroidX, refer to the version 2.x
You can download a jar from GitHub's releases page or grab it from jcenter()
or mavenCentral()
.
dependencies {
compile 'com.github.fondesa:recycler-view-divider:3.1.0'
}
<dependency>
<groupId>com.github.fondesa</groupId>
<artifactId>recycler-view-divider</artifactId>
<version>3.1.0</version>
<type>pom</type>
</dependency>