Polyadapter is a library with the goal to make it easier to work with Polymorphic Adapters for RecyclerViews!
It's build to be lightweight and entirely written in Kotlin, you don't need to create a lot of classes and a lot of boilerplates but in the meantime it's also really flexible so you can plug it into your own adapter!
It supports the basic RecyclerView.Adapter but also ListAdapter and PagedListAdapter.
Also supports:
- Sealed classes
- Enums
- Testing
If you just want to try the library before reading the documentation, you can download the package following the instructions below or clicking into the badge.
repositories {
jcenter()
//Or
maven { url "https://dl.bintray.com/victor5171/xtras" }
}
And include the library:
implementation "org.xtras.polyadapter:polyadapter:$LATEST_VERSION"
You can check the complete documentation and guide here