Jintin / MixAdapter

Compose multiple Adapter for RecyclerView in Android

Home Page:https://jitpack.io/#jintin/MixAdapter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MixAdapter

Build Status Codacy Badge

Deprecated since AndroidX introduce MergeAdapter can do same thing as we do.

Compose multiple Adapter for RecyclerView in Android

Installation

Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    // ...
    maven { url 'https://jitpack.io' }
  }
}

Step 2. Add the dependency

dependencies {
  compile 'com.github.jintin:MixAdapter:1.1'
}

Usage

For simple usage add all your adapter into MixAdapterthen done.

MixAdapter<RecyclerView.ViewHolder> adapter = new MixAdapter<>();
adapter.addAdapter(adapterA);
adapter.addAdapter(adapterB);
recyclerView.setAdapter(adapter);

You can see more example in app module or clone to run.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Jintin/MixAdapter.

License

The module is available as open source under the terms of the MIT License.

About

Compose multiple Adapter for RecyclerView in Android

https://jitpack.io/#jintin/MixAdapter

License:MIT License


Languages

Language:Kotlin 100.0%