• Stars
    star
    488
  • Rank 87,987 (Top 2 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A library which configures a divider for a RecyclerView.

RecyclerViewDivider

Build Status RecyclerViewDivider

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

It supports:

  • LinearLayoutManager
  • GridLayoutManager
  • StaggeredGridLayoutManager

Usage

A basic version of the divider can be attached to a RecyclerView in these ways:

// Default configuration.
recyclerView.addDivider()

OR

// Custom configuration.
context.dividerBuilder()
    // [...]
    .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 mavenCentral().

Gradle

Maven Central

dependencies {
    implementation 'com.github.fondesa:recycler-view-divider:x.x.x'
}