All Projects → TangoAgency → Android Data Binding Rxjava

TangoAgency / Android Data Binding Rxjava

Licence: mit
Demo that shows how to use RxJava with Android Data Binding ObservableFields

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Data Binding Rxjava

rx-property-android
Bindable and observable property for Android Data Binding
Stars: ✭ 76 (-72.86%)
Mutual labels:  rxjava
T Mvp
Android AOP Architecture by Apt, AspectJ, Javassisit, based on Realm+Databinding+MVP+Retrofit+Rxjava2
Stars: ✭ 2,740 (+878.57%)
Mutual labels:  rxjava
Kotlinwanandroid
Kotlin+模块化+响应式+MVVM 实现的风格简约、代码优雅的WanAndroid客户端
Stars: ✭ 265 (-5.36%)
Mutual labels:  rxjava
Binder
An Annotation processor that allows binding two classes with each other, where the first class can listen to the updates of the second class ... ideal for MVVM and similar patterns
Stars: ✭ 21 (-92.5%)
Mutual labels:  rxjava
Daggerandroidmvvm
Demonstrates using Dagger 2.11+ in MVVM app with Android Architecture Components, Clean Architecture, RxJava
Stars: ✭ 255 (-8.93%)
Mutual labels:  rxjava
Rxanime
Visualizer to understand RxJava operators
Stars: ✭ 261 (-6.79%)
Mutual labels:  rxjava
RxRetroAPICall
API call example using Retrofit and RxJava2
Stars: ✭ 16 (-94.29%)
Mutual labels:  rxjava
Kotlin Cleanarchitecture
This is a sample app that is part of a blog post I have written about how to architect android application using the Uncle Bob's clean architecture and Fernando Cejas Android-CleanArchitecture in Kotlin. Post in Spanish: http://katade.com/clean-architecture-kotlin/
Stars: ✭ 274 (-2.14%)
Mutual labels:  rxjava
Gank
gank.io unofficial client - RxJava2、Retrofit2 & MVP技术干货
Stars: ✭ 256 (-8.57%)
Mutual labels:  rxjava
Awesome Rxjava
Useful resources for working with RxJava
Stars: ✭ 265 (-5.36%)
Mutual labels:  rxjava
modern-android
Modern Android Project Skeleton
Stars: ✭ 17 (-93.93%)
Mutual labels:  rxjava
RxPaper
NoSQL storage with RxJava bindings [STABLE]
Stars: ✭ 88 (-68.57%)
Mutual labels:  rxjava
Simpleeyes
🔥🔥🔥A Video app illustrating Android development best practices with Kotlin
Stars: ✭ 261 (-6.79%)
Mutual labels:  rxjava
StudyNotes
🔥我只是在假装努力,你却在真正成长
Stars: ✭ 13 (-95.36%)
Mutual labels:  rxjava
Rxandroidble
An Android Bluetooth Low Energy (BLE) Library with RxJava2 interface
Stars: ✭ 3,025 (+980.36%)
Mutual labels:  rxjava
Readhub
Readhub AndroidClient
Stars: ✭ 40 (-85.71%)
Mutual labels:  rxjava
Reactive
Reactive: Examples of the most famous reactive libraries that you can find in the market.
Stars: ✭ 256 (-8.57%)
Mutual labels:  rxjava
Friendbook
📕 "友书" 小说阅读app
Stars: ✭ 275 (-1.79%)
Mutual labels:  rxjava
Functionalandroidreference
Showcase project of Functional Reactive Programming on Android, using RxJava.
Stars: ✭ 274 (-2.14%)
Mutual labels:  rxjava
Rxkprefs
🛠 A small Kotlin library to make shared preferences easy + RxJava and Coroutines support
Stars: ✭ 264 (-5.71%)
Mutual labels:  rxjava

android-data-binding-rxjava

Android Arsenal android-data-binding-rxjava Build Status

Simple demo developed with love at Tango which demonstrates how to wrap Android DataBinding ObservableField into RxJava's Observable.

With this solution it is possible to register for ObservableField's value changes and use it with RxJava operators.

You can read Medium story which explains this concept - RxJava meets Android Data Binding.

Example code

public static class MainViewModel {

        public ObservableField<String> firstName = new ObservableField<>();
        public ObservableField<String> lastName = new ObservableField<>();
        public ObservableField<String> helloText = new ObservableField<>();
        public ObservableBoolean helloButtonEnabled = new ObservableBoolean(false);

        public MainViewModel() {

            Observable.combineLatest(toObservable(firstName), toObservable(lastName), (firstName, lastName) -> StringUtils.isNotNullOrEmpty(firstName) && StringUtils.isNotNullOrEmpty(lastName))
                    .subscribe(result -> {
                        helloButtonEnabled.set(result);
                        if (!result) {
                            helloText.set(StringUtils.EMPTY);
                        }
                    }, Throwable::printStackTrace);
        }

        public void buttonClicked() {
            helloText.set(String.format("Hello %s %s !", firstName.get(), lastName.get()));
        }
}

rxjava-databinding

How it works

You can find toObservable method implementation in RxUtils.java class.

It uses ObservableField's OnPropertyChangedCallback and expose property change events to the "RxWorld".

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].