Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Rendererrecyclerviewadapter | 1,153 | 8 | a year ago | 24 | April 17, 2021 | 1 | apache-2.0 | Java | ||
A single adapter with multiple view types for the whole project | ||||||||||
Mapme | 845 | a year ago | 2 | March 30, 2022 | 13 | mit | Kotlin | |||
The Android maps adapter | ||||||||||
Multiviewadapter | 791 | 2 years ago | 30 | apache-2.0 | Java | |||||
Easily create complex recyclerview adapters in android | ||||||||||
Multityperecyclerviewadapter | 768 | 2 years ago | 1 | July 11, 2021 | 1 | apache-2.0 | Java | |||
一个专注于RecyclerView优雅刷新(接管资源和数据源)、高灵活、低耦合、健壮性以及高效性的MVP模式库,支持大多数Adapter | ||||||||||
Oneadapter | 444 | 13 days ago | 3 | mit | Kotlin | |||||
A Viewholderless Adapter for RecyclerView, who supports builtin diffing, states (paging, empty...), events (clicking, swiping...), and more. | ||||||||||
Kiel | 310 | 2 years ago | 1 | April 27, 2021 | 12 | apache-2.0 | Kotlin | |||
(Published to MavenCentral) Kotlin way of building RecyclerView Adapter 🧩. You do not have to write RecyclerView Adapters again and again and suffer from handling of different view types. Kiel will help you. | ||||||||||
Mjolnirrecyclerview | 235 | 3 years ago | 1 | February 11, 2021 | 3 | apache-2.0 | Java | |||
[DEPRECATED] This library is no longer maintained and it will not receive any more updates. | ||||||||||
Sherlockadapter | 185 | 3 years ago | Java | |||||||
一个万能的封装了RecyclerView.Adapter的功能库。 | ||||||||||
Diffadapter | 176 | 3 years ago | 1 | Java | ||||||
A high-performance , easy-to-use Adapter for RecyclerView ,using diffutil | ||||||||||
Smart Recycler Adapter | 135 | 2 years ago | 1 | apache-2.0 | Kotlin | |||||
Small, smart and generic adapter for recycler view with easy and advanced data to ViewHolder binding. |
==========
Provides a simple way to extend the default RecyclerView behaviour with support for headers, footers, empty view, DiffUtil and ArrayAdapter like methods.
Add the library as a dependency to your build.gradle
compile 'co.infinum:mjolnirrecyclerview:[email protected]'
Check the latest version here.
Add a custom number of headers and footers to MjolnirRecyclerView by using 2 simple methods from MjolnirRecyclerAdapter:
adapter.setHeader(View view)
adapter.setHeader(View view)
Empty view support for MjolnirRecyclerView. View is automatically hidden when adapter is populated with some data, and is automatically shown once again when adapter becomes empty.
recyclerView.setEmptyView(View view)
You can also show empty view while adapter is not set to the MjolnirRecyclerView, which is handy if you want to intialize adapter at some later point in the time.
// show empty view if adapter is not set
recyclerView.setEmptyView(View view, true)
DiffUtil support for MjolnirRecyclerAdapter. Simply add DiffUtil.Callback in adapters update method:
adapter.update(new ItemDiffUtilResult())
As DiffUtil is a blocking sync action, it's executed on the background thread inside the MjolnirRecyclerAdapter by using a AsyncTask. As a result of this approach, you need to call cancel() method on your adapter when your activity or fragment is about to be destroyed, so that the adapter is not updated if the screen has been destroyed.
@Override
protected void onDestroy() {
super.onDestroy();
adapter.cancel();
}
MjolnirRecyclerAdapter has full support for ArrayAdapter methods, like add(), addAll(), reset(), remove(), set()...
Feedback and code contributions are very much welcome. Just make a pull request with a short description of your changes. By making contributions to this project you give permission for your code to be used under the same license.
Maintained and sponsored by Infinum.