Posts

Showing posts from January, 2018

Temp-1

1. Print Primptive & Non-Primptive Data Type - Using Flowable, Observable -------------------------------------------------------------------- A. Observable Observable.just( "one", "two", "three" ) .subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(value -> textView.append(value+", ") ); B. Flowable  Flowable.just( "one", "two", "three" ) .subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(value -> textView.append(value+", ") ); C. CompletableToFlowable  CompletableToFlowable.just( "one", "two", "three" ) .subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(value -> textView.append(value+", ") ); ---------------------------------------------------------------------- 2. Print collection - Using Flowable, Observabl...

Installation

1. Add below library to App-Level Gradle compile ' io.reactivex.rxjava2:rxandroid:2.0.1 ' compile ' io.reactivex.rxjava2:rxjava:2.1.7 ' 2. Use Java 8 compatibility code - To support lambda expression and java 8+ feature   compileOptions {  targetCompatibility 1.8  sourceCompatibility 1.8  }