/RecyclerViewDivider

A library which configures a divider for a RecyclerView.

Primary LanguageKotlinApache License 2.0Apache-2.0

RecyclerViewDivider

Build Status

A RecyclerView's divider that can be customized with simple properties or advanced ones.

It supports:

  • LinearLayoutManager (completely)
  • GridLayoutManager (completely)
  • StaggeredGridLayoutManager (partially)

Usage

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.

Compatibility

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

Integration

You can download a jar from GitHub's releases page or grab it from jcenter() or mavenCentral().

Gradle

dependencies {
    compile 'com.github.fondesa:recycler-view-divider:3.1.0'
}

Maven

<dependency>
  <groupId>com.github.fondesa</groupId>
  <artifactId>recycler-view-divider</artifactId>
  <version>3.1.0</version>
  <type>pom</type>
</dependency>