Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fondesa/recycler-view-divider

A library which configures a divider for a RecyclerView.
https://github.com/fondesa/recycler-view-divider

android androidx divider divideritemdecoration gridlayoutmanager itemdecoration linearlayoutmanager list recyclerview rtl staggered staggeredgrid staggeredgridlayoutmanager

Last synced: 9 days ago
JSON representation

A library which configures a divider for a RecyclerView.

Awesome Lists containing this project

README

        

RecyclerViewDivider
===============
[![Build Status](https://github.com/fondesa/recycler-view-divider/workflows/GitHub%20CI%20Build/badge.svg)](https://github.com/fondesa/recycler-view-divider/actions)
[![RecyclerViewDivider](https://www.appbrain.com/stats/libraries/shield/recyclerviewdivider.svg)](https://www.appbrain.com/stats/libraries/details/recyclerviewdivider/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:

```kotlin
// Default configuration.
recyclerView.addDivider()
```
**OR**
```kotlin
// 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](https://github.com/fondesa/recycler-view-divider/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](https://github.com/fondesa/recycler-view-divider/releases) or grab it from ```mavenCentral()```.

### Gradle ###

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.fondesa/recycler-view-divider/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.fondesa/recycler-view-divider)

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