RxJava-Utils

More: Author   ReportBugs   
Tags:

@Tony 沈哲 on weibo License

在日常开发实践中,本人所积累的 RxJava 相关的工具类,持续更新 ing

下载

将它添加到项目的 root build.gradle 中:

    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

然后在项目或者在 module 中添加:

implementation 'com.github.fengzhizi715.RxJava-Utils:utils:v0.22'

Feature

  1. RetryWithDelay

    RxJava 的重连机制,需要配合 retryWhen 操作符一起使用

  1. Debounce
  2. debounce()
  3. debounceIf()
  4. debounceAndSubscribe()

  5. CountDown

  6. countDown() 倒计时函数

  7. Delay

  8. delay() 延时函数

  9. Polling

  10. pollingToTakeUntil() 轮询函数,当触发某个条件时轮询结束。下游会不停地收到订阅,需要自行判断
  11. pollingWhenItEnd() 轮询函数,当触发某个条件时轮询结束。轮询结束时,下游才开始收到订阅
  12. pollingWithLimitedNumber() 轮询函数,当触发某个条件时轮询结束,该函数会限制轮询的次数,达到轮询的次数后便不再进行轮询。

  13. AutoRefresh

  14. refresh() 自动刷新的函数

  15. Extension

    为 Disposable 提供扩展函数

  16. safeDispose() 安全释放 Disposable
  17. isDisposed() 判断 Disposable 是否已经 Disposed

  18. RxValue、RxValueMutable

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools