amitshekhariitbhu/RxJava2-Android-Samples
amitshekhariitbhu/RxJava2-Android-Samples has 4,903 GitHub stars and 1,038 forks. GitHot measured -2 in 7 days. Last checked 2026-11-11 17:01 UTC. Last push 2026-01-28.
RxJava 2 Android Examples - How to use RxJava 2 in Android
What you can do
- DisposableExampleActivity - Using CompositeDisposable. Blog for reference
- FlowableExampleActivity - Using Flowable and reduce operator
- SingleObserverExampleActivity - Using SingleObserver
- CompletableObserverActivity - Using CompletableObserver
측정된 스타 증가
- in 24h
- 업데이트 지연
- in 7 days
- -2
- in 15 days
- 업데이트 지연
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Learning RxJava 2 for Android by example
This project is for :
- who is migrating to RxJava 2
- or just started with RxJava.
About me
Hi, I am Amit Shekhar, Founder @ Outcome School • IIT 2010-14 • I have taught and mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos.
Follow Amit Shekhar
Follow Outcome School
I teach at Outcome School
- AI and Machine Learning
- Android
Join Outcome School and get a high-paying tech job: Outcome School
Just Build the project and start learning RxJava by examples.
RxJava 2.0 has been completely rewritten from scratch on top of the Reactive-Streams specification. The specification itself has evolved out of RxJava 1.x and provides a common baseline for reactive systems and libraries.
Using RxJava 2.0 Library in your application
Add this in your build.gradle
compile 'io.reactivex.rxjava2:rxjava:X.X.X'
If you are using RxAndroid also, then add the following
compile 'io.reactivex.rxjava2:rxandroid:X.X.X'
RxJava 2 Operators Examples present in this sample project:
Map-> transform the items emitted by an Observable by applying a function to each item. Blog: RxJava Operator Map vs FlatMapZip-> combine the emissions of multiple Observables together via a specified function and emit single items for each combination based on the results of this functionFilter-> emit only those items from an Observable that pass a predicate testFlatMap-> transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable. Blog: RxJava Operator Map vs FlatMapTake-> emit only the first n items emitted by an Observable. Blog for referenceReduce-> apply a function to each item emitted by an Observable, sequentially, and emit the final valueSkip-> suppress the first n items emitted by an ObservableBuffer-> periodically gather items emitted by an Observable into bundles and emit these bundles rather than emitting the items one at a timeConcat-> emit the emissions from two or more Observables without interleaving them. Blog for referenceReplay-> ensure that all observers see the same sequence of emitted items, even if they subscribe after the Observable has begun emitting itemsMerge-> combine multiple Observables into one by merging their emissionsSwitchMap-> transform the items emitted by an Observable into Observables, and mirror those items emitted by the most-recently transformed Observable
Highlights of the examples :
- DisposableExampleActivity - Using
CompositeDisposable. Blog for reference - FlowableExampleActivity - Using
Flowableandreduceoperator - SingleObserverExampleActivity - Using
SingleObserver - CompletableObserverActivity - Using
CompletableObserver - MapExampleActivity - Using
mapOperator. Blog: RxJava Operator Map vs FlatMap - ZipExampleActivity - Using
zipOperator - BufferExampleActivity - Using
bufferOperator - TakeExampleActivity - Using
takeOperator. Blog for reference - ReduceExampleActivity - Using
reduceOperator - FilterExampleActivity - Using
filterOperator - SkipExampleActivity - Using
skipOperator - ReplayExampleActivity - Using
replayOperator - ConcatExampleActivity - Using
concatOperator. Blog for reference - MergeExampleActivity - Using
mergeOperator - DeferExampleActivity - Using
deferObservable - SwitchMapExampleActivity - Using
switchMapObservable - IntervalExampleActivity - Using
Interval. Blog for reference - RxBusActivity - RxBus, RxJava2Bus, EventBus, RxEventBus
- PaginationActivity - Pagination for loadMore in RecyclerView. Blog: Pagination In RecyclerView Using RxJava Operators
- ComposeOperatorExampleActivity - Compose operator for reusable
- Search Implementation - Using
debounce,switchMap,distinctUntilChanged - Implement Caching Using RxJava Operators - Using
concat,firstElement - PublishSubjectExampleActivity. Blog: RxJava Subject - Publish, Replay, Behavior, and Async
Find this project useful ? :heart:
- Support it by clicking the :star: button on the upper right of this page. :v:
Thanks
Amit Shekhar
Co-Founder @ Outcome School
You can connect with me on:
License
Copyright (C) 2024 Amit Shekhar
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.
Contributing to RxJava 2 Android Samples
Just make pull request. You are in!
관련 프로젝트 살펴보기
sindresorhus/awesome
😎 온갖 흥미로운 주제에 관한 Awesome 목록 [참고: 기존 풀 리퀘스트를 따라잡을 여유가 생길 때까지 풀 리퀘스트가 일시적으로 비활성화되어 있습니다]
535,734 스타EbookFoundation/free-programming-books
:books: 무료로 이용할 수 있는 프로그래밍 도서
401,485 스타nilbuild/developer-roadmap
개발자의 커리어 성장을 돕는 인터랙티브 로드맵, 가이드 및 기타 교육 콘텐츠.
371,902 스타vinta/awesome-python
“Python으로 X를 하고 싶은데, 어떤 도구를 써야 할까?”에 답하는 결정판 목록.
334,241 스타