All Projects → AnkitDroidGit → Rxkotlin Rxjava2 Android Samples

AnkitDroidGit / Rxkotlin Rxjava2 Android Samples

Learning RxKotlin2 for Android by Examples - Migration From RxKotlin1/RxJava1 to RxKotlin2/RxJava2 - How to use RxKotlin 2 in Android - RxLogin using RxBinding - Pagination using RxKotlin

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Rxkotlin Rxjava2 Android Samples

Rxbiometric
☝️ RxJava and RxKotlin bindings for Biometric Prompt (Fingerprint Scanner) on Android
Stars: ✭ 295 (+353.85%)
Mutual labels:  rxjava, rxkotlin, rxandroid2
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 (+321.54%)
Mutual labels:  rxjava, rxkotlin
Kotlin Android Mvp Starter
Create/Generate your kotlin MVP projects easily
Stars: ✭ 270 (+315.38%)
Mutual labels:  rxkotlin, rxandroid2
Rxbus
🚌 The RxBus as steady as an old dog.
Stars: ✭ 334 (+413.85%)
Mutual labels:  rxjava, rxandroid2
rxkotlin-jdbc
Fluent RxJava JDBC extension functions for Kotlin
Stars: ✭ 27 (-58.46%)
Mutual labels:  rxjava, rxkotlin
modern-android
Modern Android Project Skeleton
Stars: ✭ 17 (-73.85%)
Mutual labels:  rxjava, rxkotlin
Swipe
👉 detects swipe events on Android
Stars: ✭ 324 (+398.46%)
Mutual labels:  rxjava, rxandroid2
Games
The Games app has two features which are listing and showing detail of games.
Stars: ✭ 15 (-76.92%)
Mutual labels:  rxkotlin, rxandroid2
Weatherapp
5 Day Forecast app that works on Android and uses latest tools (Kotlin, Navigation, Room, LiveData, Databinding, Dagger 2)
Stars: ✭ 426 (+555.38%)
Mutual labels:  rxjava, rxkotlin
Rxjava2 Android Samples
RxJava 2 Android Examples - Migration From RxJava 1 to RxJava 2 - How to use RxJava 2 in Android
Stars: ✭ 4,950 (+7515.38%)
Mutual labels:  rxjava, tutorial
Effective Rxjava
Effective RxJava
Stars: ✭ 563 (+766.15%)
Mutual labels:  rxjava, tutorial
ReactiveBus
🚍 Reactive Event Bus for JVM (1.7+) and Android apps built with RxJava 2
Stars: ✭ 17 (-73.85%)
Mutual labels:  rxjava, rxandroid2
neurosky-android-sdk
Android SDK for the NeuroSky MindWave Mobile Brainwave Sensing Headset
Stars: ✭ 39 (-40%)
Mutual labels:  rxjava, rxkotlin
Rxkprefs
🛠 A small Kotlin library to make shared preferences easy + RxJava and Coroutines support
Stars: ✭ 264 (+306.15%)
Mutual labels:  rxjava, rxkotlin
iMoney
iMoney 金融项目
Stars: ✭ 55 (-15.38%)
Mutual labels:  rxjava, rxandroid2
Android Mvp
Android Model View Presenter
Stars: ✭ 28 (-56.92%)
Mutual labels:  rxjava, tutorial
Reactivenetwork
Android library listening network connection state and Internet connectivity with RxJava Observables
Stars: ✭ 2,484 (+3721.54%)
Mutual labels:  rxjava, rxandroid2
Prefser
Wrapper for Android SharedPreferences with object serialization and RxJava Observables
Stars: ✭ 228 (+250.77%)
Mutual labels:  rxjava, rxandroid2
Net
Android上强大的网络请求
Stars: ✭ 344 (+429.23%)
Mutual labels:  rxjava, rxkotlin
Mango
🏀 An Android app for dribbble.com
Stars: ✭ 659 (+913.85%)
Mutual labels:  rxjava, rxkotlin

RxKotlinOperators

Learn RxKotlin with simple coding examples

GitHub stars | GitHub followers

Migration from RxKotlin 1.0 to RxKotlin 2.0

To allow having RxKotlin 1 and RxKotlin 2 side-by-side, RxKotlin 2 is under the maven coordinates io.reactivex.rxjava2:rxjava:2.x.y and classes are accessible below io.reactivex. Users switching from 1.x to 2.x have to re-organize their imports, but carefully.

Using RxKotlin 2.0 Library in your application

Add this in your build.gradle

compile 'io.reactivex.rxjava2:rxjava:2.1.1'

If you are using RxAndroid also, then add the following

compile 'io.reactivex.rxjava2:rxandroid:2.0.1'

Quick Look on few changes done in RxKotlin2 over RxKotlin1

RxJava1/RxKotlin1 -> RxJava2/RxKotlin2

  • onCompleted -> onComplete - without the trailing d
  • Func1 -> Function
  • Func2 -> BiFunction
  • CompositeSubscription -> CompositeDisposable
  • limit operator has been removed - Use take in RxKotlin2

....... and so on

RxOperators :

  • map() -> Transform the items emitted by an Observable by applying a function to each item

  • zip() -> Combine the emissions of multiple Observables together via a specified function and emit single items for each combination based on the results of this function

  • take() -> Emit only the first n items emitted by an Observable

  • timer() -> Create an Observable that emits a particular item after a given delay

  • flatMap() -> Transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable

  • interval() -> Create an Observable that emits a sequence of integers spaced by a given time interval

  • debounce() -> Only emit an item from an Observable if a particular time span has passed without it emitting another item

  • Single Observer -> A Single is something like an Observable, but instead of emitting a series of values — anywhere from none at all to an infinite number — it always either emits one value or an error notification.

  • reduce() -> Apply a function to each item emitted by an Observable, sequentially, and emit the final value

  • buffer() -> Periodically gather items emitted by an Observable into bundles and emit these bundles rather than emitting the items one at a time

  • filter() -> Emit only those items from an Observable that pass a predicate test

  • skip() -> Suppress the first n items emitted by an Observable

  • scan() -> Apply a function to each item emitted by an Observable, sequentially, and emit each successive value

  • replay() -> Ensure that all observers see the same sequence of emitted items, even if they subscribe after the Observable has begun emitting items

  • concat() -> Emit the emissions from two or more Observables without interleaving them

  • merge() -> Combine multiple Observables into one by merging their emissions

  • defer() -> The Defer operator waits until an observer subscribes to it, and then it generates an Observable, typically with an Observable factory function. It does this afresh for each subscriber, so although each subscriber may think it is subscribing to the same Observable, in fact each subscriber gets its own individual sequence.

  • distinct() -> Suppress duplicate items emitted by an Observable

  • Replay Subject -> Replays events (in a configurable bounded or unbounded manner) to current and late Observers.

  • Publish Subject -> Subject that, once an Observer has subscribed, emits all subsequently observed items to the subscriber

  • Behaviour Subject -> Subject that emits the most recent item it has observed and all subsequent observed items to each subscribed Observer.

  • Aync Subject -> A Subject that emits the very last value followed by a completion event or the received error to Observers.

  • Throttle First -> Emit the first items emitted by an Observable within periodic time intervals

  • amb() -> Given two or more source Observables, emits all of the items from the first of these Observables to emit an item

  • Catch -> Recover from an onError notification by continuing the sequence without error

  • Retry -> If a source Observable emits an error, resubscribe to it in the hopes that it will complete without error

  • Coming More

TODO

Adding more operator examples

Highlights :

RxBinding

Rx is powerful because we can compose transformations. What that means is that we can have reusable, safe and more functional code that simply plugs into your code.

As an example let’s say we’re making a login screen with an email and a password…

Consider the following rules that we want for our email addresses

  • Length should be greater than 6
  • Should have a correct email pattern
  • Let the user know if any of the above fails
  • On each key stroke, verify

Highlights :

Pagination And Lazy loading using RxKotlin

Highlights :

Contact - Let's connect to learn together

License

Copyright 2017 Ankit Kumar

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