All Projects → Team-SOFTsk → Observableadapter

Team-SOFTsk / Observableadapter

Licence: apache-2.0
RecyclerView Adapter for RxJava, separates collection model from Android framework dependencies

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Observableadapter

Smartrecom
一款基于行为识别和个性化推荐的智能推荐APP,实时为你推荐音乐和电影,让你的生活更休闲,更精彩!
Stars: ✭ 663 (+4320%)
Mutual labels:  rxjava, recyclerview
Featureadapter
FeatureAdapter (FA) is an Android Library providing an optimized way to display complex screens on Android.
Stars: ✭ 112 (+646.67%)
Mutual labels:  rxjava, recyclerview
Circulerautoscrollingrecyclerview
Sample code of infinite rotation using RecyclerView. Built with Kotlin
Stars: ✭ 48 (+220%)
Mutual labels:  rxjava, recyclerview
RxAnimator
An RxJava2 binding for android Animator
Stars: ✭ 80 (+433.33%)
Mutual labels:  rxjava, observable
Rxretrojsoup
A simple API-like from html website (scrapper) for Android, RxJava2 ready !
Stars: ✭ 492 (+3180%)
Mutual labels:  rxjava, observable
Androidproject
Android 技术中台,但愿人长久,搬砖不再有
Stars: ✭ 4,398 (+29220%)
Mutual labels:  rxjava, recyclerview
Rxlifecycle
Rx binding of stock Android Activities & Fragment Lifecycle, avoiding memory leak
Stars: ✭ 131 (+773.33%)
Mutual labels:  rxjava, observable
Effective Rxjava
Effective RxJava
Stars: ✭ 563 (+3653.33%)
Mutual labels:  rxjava, observable
Supermvp
MVP“美”图+新闻+天气预报+Material+RxJava3+Retrofit2+Glide4+AndroidX+Leakcanary+Butterknife
Stars: ✭ 763 (+4986.67%)
Mutual labels:  rxjava, recyclerview
Mapme
The Android maps adapter
Stars: ✭ 844 (+5526.67%)
Mutual labels:  recyclerview
Rxjava2 Operators Magician
你用不惯 RxJava,只因缺了这把钥匙 🔑 You are not used to RxJava, just because of the lack of this key.
Stars: ✭ 868 (+5686.67%)
Mutual labels:  rxjava
Celladapter
CellAdapter simplifies working with RecyclerView. It provides an opportunity to easily support multiple view types, to separate ViewHolders from Adapter class, map data to a view in a convenient way, register and handle UI callbacks for each ViewHolder.
Stars: ✭ 24 (+60%)
Mutual labels:  recyclerview
Habitica Android
Native Android app for Habitica
Stars: ✭ 847 (+5546.67%)
Mutual labels:  rxjava
Spring Reactive Sample
Spring 5 Reactive playground
Stars: ✭ 867 (+5680%)
Mutual labels:  rxjava
Slimadapter
A slim & clean & typeable Adapter without# VIEWHOLDER
Stars: ✭ 939 (+6160%)
Mutual labels:  recyclerview
Read Multiple Files
Read multiple files Observable way
Stars: ✭ 13 (-13.33%)
Mutual labels:  observable
Sjly
手机乐园第三方Android客户端,采用单Activity多Fragment架构,支持全局滑动返回,实现手机乐园各种基本功能,支持登录、浏览、下载、发布动态、夜间模式等功能
Stars: ✭ 24 (+60%)
Mutual labels:  rxjava
Recyclerviewtest
RecyclerView 实践学习的demo,其中有基本的列表,表格,瀑布流,进阶的,等等
Stars: ✭ 23 (+53.33%)
Mutual labels:  recyclerview
Vsphere Connect
A modern vSphere Client
Stars: ✭ 14 (-6.67%)
Mutual labels:  observable
Multilinedivider
Multi divider in RecyclerView on Android.
Stars: ✭ 13 (-13.33%)
Mutual labels:  recyclerview

ObservableCollection

RecyclerView Adapter for RxJava, separates list's model from Android framework dependencies

Download Maven Central

Introduction

Supports RxJava2 and automatic adapter notify dispatching (via DiffUtils comparison)

Usage

First, import the library via gradle dependency

compile 'sk.teamsoft:observablecollection:{latest_version}'

Check Sample app for both simple and advanced use-cases.

Simple case

  1. Create source (here, Data is the model class)
SimpleAdapterSource<Data> source = new SimpleAdapterSource<>(Collections.<Data>emptyList(), R.layout.view_data);
  1. Create Adapter and set to RecyclerView
recyclerView = (RecyclerView) findViewById(...)             //or use Butterknife
recyclerView.setAdapter(new ObservableAdapter<>(source));
  1. Prepare View
<sk.teamsoft.observableadapterdemo.simple.DataView ...>
    <TextView android:id="@+id/data" .../>
</sk.teamsoft.observableadapterdemo.simple.DataView>
public class DataView extends LinearLayout implements BindableView<Data> {

    private TextView label;

    public DataView(@NonNull Context context) {
        super(context);
    }

    ...other constructors...

    @Override protected void onFinishInflate() {
        super.onFinishInflate();
        label = (TextView) findViewById(R.id.data);
    }

    @Override public void bindItem(Data item) {
        label.setText(item.label);
    }

    @Override public Observable<Object> onObservableEvent() {
        return null;
    }
}
  1. Set data
source.setData(data1);
...
source.setData(data2);
...
source.setData(data3);

Advanced use case

Take a look at Advanced demo

Looking for RxJava1 version?

Coming soon... contact us for more info

Looking for Kotlin version?

Coming soon... contact us for more info

Contact

Team-SOFT s.r.o.
[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].