All Projects → zhihu → Rxlifecycle

zhihu / Rxlifecycle

Bind observables to the lifecycle of Activity or Fragment in a non-invasive way.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Rxlifecycle

Rxcache
简单一步,缓存搞定。这是一个专用于 RxJava,解决 Android 中对任何 Observable 发出的结果做缓存处理的框架
Stars: ✭ 377 (-27.5%)
Mutual labels:  rxjava2
Bilisoleil
An unofficial bilibili client for android --rxjava2+mvp+okhttp3+retrofit2+dagger2
Stars: ✭ 430 (-17.31%)
Mutual labels:  rxjava2
Rxretrojsoup
A simple API-like from html website (scrapper) for Android, RxJava2 ready !
Stars: ✭ 492 (-5.38%)
Mutual labels:  rxjava2
Rxbluetooth
Android reactive bluetooth
Stars: ✭ 405 (-22.12%)
Mutual labels:  rxjava2
Androidut
Android开发中必要的一环---单元测试(Unit Test)
Stars: ✭ 419 (-19.42%)
Mutual labels:  rxjava2
Mvp Android Arch Component
Android MVP sample adapts with new Android architecture components (Lifecycle, Room).
Stars: ✭ 446 (-14.23%)
Mutual labels:  rxjava2
Rxfingerprint
Android Fingerprint authentication and encryption with RxJava
Stars: ✭ 373 (-28.27%)
Mutual labels:  rxjava2
Proxypool
给爬虫使用的代理IP池
Stars: ✭ 508 (-2.31%)
Mutual labels:  rxjava2
Mvvmarms
Android MVVM Architecture Components based on MVPArms and Android Architecture Components.
Stars: ✭ 425 (-18.27%)
Mutual labels:  rxjava2
Cloudreader
🗡️ 云阅:一款基于网易云音乐UI,使用玩Android Api,Retrofit2 + RxJava2 + Room + MVVM-databinding架构开发的Android客户端
Stars: ✭ 4,611 (+786.73%)
Mutual labels:  rxjava2
Simviso Source Code Interpretation Sharing
simviso 的一系列源码解读分享视频,涉及国外顶级学府课程翻译、国外顶级开发者视频翻译,JDK, Rxjava,Spring Reactor, Netty ,Reactor-Netty ,Spring Webflux 我的目标是将Java的响应式建立起一套学习体系,假如你想深入,可以参考我的视频和后续出版的书籍,同时展现一些我的编程经验,做一个铺路人
Stars: ✭ 412 (-20.77%)
Mutual labels:  rxjava2
Rxunfurl
A reactive extension to generate URL previews.
Stars: ✭ 417 (-19.81%)
Mutual labels:  rxjava2
V9porn
9*Porn Android 客户端,突破游客每天观看10次视频的限制,还可以下载视频
Stars: ✭ 4,507 (+766.73%)
Mutual labels:  rxjava2
Mvvmsmart
基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合ViewModel+Lifecycles+Navigation+DataBinding+LiveData+Okhttp+Retrofit+RxJava+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发高质量、易维护的Android应用。 项目组会持续维护,请放心使用.欢迎Start并Fork交流.
Stars: ✭ 382 (-26.54%)
Mutual labels:  rxjava2
Traceur
Easier RxJava2 debugging with better stacktraces
Stars: ✭ 502 (-3.46%)
Mutual labels:  rxjava2
Kotlin Mvvm Covid19
This repository contains simple COVID19 data monitoring with android stack MVVM, Live Data, Koin, RxJava, RxBinding, Offline first with simple caching, etc
Stars: ✭ 372 (-28.46%)
Mutual labels:  rxjava2
Roxie
Lightweight Android library for building reactive apps.
Stars: ✭ 441 (-15.19%)
Mutual labels:  rxjava2
Rxfirebase
Rxjava 2.0 wrapper on Google's Android Firebase library.
Stars: ✭ 509 (-2.12%)
Mutual labels:  rxjava2
Rxlocation
🗺 [DEPRECATED] Reactive Location APIs Library for Android and RxJava 2
Stars: ✭ 503 (-3.27%)
Mutual labels:  rxjava2
Android Mvp Architecture
This repository contains a detailed sample app that implements MVP architecture using Dagger2, GreenDao, RxJava2, FastAndroidNetworking and PlaceholderView
Stars: ✭ 4,360 (+738.46%)
Mutual labels:  rxjava2

RxLifecyle is a library that can help you to unsubscribe the observable sequences automatically when a activity or fragment is destroying. There are some differences between this library and trello/RxLifecycle:

  • This library will actually unsubscribe the sequence (See here). It means that the downstream observer will not receive onComplete(), onError()... anymore when the unsubscription occurs.

  • This library doesn't require you to inherit any activity or fragment. It will insert a non-gui fragment to your activity or fragment to listen the lifecycle events.

The simplest usage:

Observable.interval(0, 2, TimeUnit.SECONDS)
        // ...
        .compose(RxLifecycle.bind(this)
                .<Long>disposeObservableWhen(LifecycleEvent.DESTROY_VIEW))
        .subscribe();

In order to make sure the downstream will not continue to emit items, you need to put the compose(RxLifecycle.bind ..) at the bottom of the chain call. See the example for learning more usages.

To integrate this library to your project, you need to add the JitPack repository to build.gradle repositories firstly.

repositories {
    maven { url "https://jitpack.io" }
}

And then add library dependencies:

dependencies {
    compile 'com.github.nekocode.rxlifecycle:rxlifecycle:{lastest-version}'
    compile 'com.github.nekocode.rxlifecycle:rxlifecycle-compact:{lastest-version}' // Optional
}

This project is licensed under Apache 2.0. The lastest version of the library is Release.

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