RxRecyclerAdapter alternatives and similar packages
Based on the "Adapter" category.
Alternatively, view RxRecyclerAdapter alternatives based on common mentions on social networks and blogs.
-
Epoxy
Epoxy is an Android library for building complex screens in a RecyclerView -
FastAdapter
The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction... -
SectionedRecyclerViewAdapter
An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually. -
Renderers
Renderers is an Android library created to avoid all the boilerplate needed to use a RecyclerView/ListView with adapters. -
MultiChoiceAdapter
Android - A ListView adapter with support for multiple choice modal selection -
AutoplayVideos
Android library to auto-play/pause videos from url in recyclerview. -
SlimAdapter
A slim & clean & typeable Adapter without# VIEWHOLDER -
RecyclerViewHelper
:page_with_curl: [Android Library] Giving powers to RecyclerView -
easy-adapter
[DEPRECATED] Easy Adapters library for Android -
EfficientAdapter
Create a new adapter for a RecyclerView or ViewPager is now much easier. -
SmartRecyclerAdapter
Small, smart and generic adapter for recycler view with easy and advanced data to ViewHolder binding. -
adapter-kit
Adapter Kit is a set of useful adapters for Android. -
FunDapter
Simplify Adapter creation for your Android ListViews. -
GridListViewAdapters
This library provides GridAdapters(ListGridAdapter & CursorGridAdapter) which enable you to bind your data in grid card fashion within android.widget.ListView, Also provides many other features related to GridListView. -
Items
Generate data-view-binding adapters of android recycler view. -
instant-adapter
Just like instant coffee, saves 78% of your time on Android's Custom Adapters. -
EasyListViewAdapters
This library provides Easy Android ListView Adapters(EasyListAdapter & EasyCursorAdapter) which makes designing Multi-Row-Type ListView very simple & cleaner, It also provides many useful features for ListView. -
AutoAdapter
This Repository simplifies working with RecyclerView Adapter -
Preview Image Collection
A library to make a mosaic with a preview of multiple images -
IntentSharingAnim
Intent sharing between activities of views with animation -
Android-BasicAdapter
No separate adapter files for not-so-complex RecyclerViews -
Suggestive ๐
An Android UI library that allows easy implementation of (text) input suggestion popup windows. -
MultiLevelAdapter
Android library to allow collapsing and expanding items in RecyclerView's Adapter on multiple levels -
Register-Yourself
This app uses SQLite database to sign-up and register a user
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of RxRecyclerAdapter or a related project?
README
RxRecyclerAdapter
Rx based generic RecyclerView Adapter Library.
How to use it?
Example!
- Enable Databinding by adding these lines to your build.gradle
kotlin dataBinding { enabled = true }
Create the layout file
<?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="@dimen/activity_horizontal_margin"> <TextView android:id="@+id/textViewItem" android:layout_width="match_parent" android:layout_height="wrap_content" tools:text="Recycler Item"/> </LinearLayout> </layout>
Create your dataSet
//Dummy DataSet val dataSet = mutableListOf<String>() dataSet.add("Lorem") dataSet.add("ipsum") dataSet.add("dolor") dataSet.add("sit") dataSet.add("amet")
Create RxDataSource
// Simple data source val rxDataSource = RxDataSource<ItemLayoutBinding, String>(R.layout.item_layout, dataSet)
rxDataSource .map { it.toUpperCase() } .repeat(4) .asObservable() .subscribe { val binding = it.viewDataBinding ?: return@subscribe binding.textViewItem.text = it.item }
And that's it! The recyclerView is going to show
<img src="https://raw.githubusercontent.com/ahmedrizwan/RxRecyclerAdapter/master/sample/src/main/res/drawable/rx_adapter.png" width=400px />
#### Changing the data dynamically
Simply call updateAdapter after making changes to the dataSet and that'll do the trick!
```java
rxDataSource.map(...).filter(...).take(...).updateAdapter();
Adapter for multiple View Types
If multiple view types are required for your recyclerView, let's say, we have two types HEADER and ITEM then the coding steps will be :-
- Enable Databinding
- Create a list of ViewHolderInfo
kotlin //ViewHolderInfo List val viewHolderInfoList = ArrayList<ViewHolderInfo>() viewHolderInfoList.add(ViewHolderInfo(R.layout.item_layout, TYPE_ITEM)) viewHolderInfoList.add(ViewHolderInfo(R.layout.item_header_layout, TYPE_HEADER))
- Create an instance of RxDataSourceSectioned implementation
kotlin // Sectioned data source val rxDataSourceSectioned = RxDataSourceSectioned(dataSet, viewHolderInfoList, object : OnGetItemViewType() { override fun getItemViewType(position: Int): Int { if (position % 2 == 0) { // even are headers return TYPE_HEADER } return TYPE_ITEM } })
Compose and call bindRecyclerView passing in recyclerView, viewHolderInfoList and viewTypeCallBack
rxDataSourceSectioned .asObservable() .subscribe { val viewDataBinding = it.viewDataBinding val data = it.item when (viewDataBinding) { is ItemLayoutBinding -> viewDataBinding.textViewItem.text = "ITEM: " + data is ItemHeaderLayoutBinding -> viewDataBinding.textViewHeader.text = "HEADER: " + data } }
And the output would look something like
More examples and details here
How to update adapter?
You can update all the data set by call updateDataSet(), then call updateUdapter() to update the adapter (get "notifiyDataSetChange()" effect)
rxDataSource.updateDataSet(newDataSet)
rxDataSource.updateAdapter()
If you want to update one item of the data set, you can use updateDataSet(updatedList, effectedPosition, transactionType),
rxDataSource.updateDataSet(
dataSet.apply { removeAt(deletedPosition) },
deletedPosition,
RxDataSource.TransactionTypes.DELETE
)
Download
Repository available on jCenter
implementation 'com.minimize.android:rxrecycler-adapter:1.3.2'
If the dependency fails to resolve, add this to your project repositories
repositories {
maven {
url "http://dl.bintray.com/ahmedrizwan/maven"
}
}
License
Copyright 2015 Ahmed Rizwan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the RxRecyclerAdapter README section above
are relevant to that project's source code only.