美文网首页
`RxJava Android`开发全系列

`RxJava Android`开发全系列

作者: CharonChui | 来源:发表于2018-08-01 10:46 被阅读0次

    RxJava Android开发全系列

    有关RxJava的介绍请看RxJava详解系列

    要说16年android开发中要说那个应用最流行,那就是RxJava了,现在越来越多的android项目都会用到RxJava,下面就介绍一些RxJava必备的扩张库。

    RxAndroid

    RxAndroid

    Android specific bindings for RxJava.

    This module adds the minimum classes to RxJava that make writing reactive components in Android applications easy and hassle-free. More specifically, it provides a Scheduler that schedules on the main thread or any given Looper.

    Android中使用RxJava的必备类库,虽然里面提供的内容并不多只有AndroidSchedulersHandlerSchedulerLooperScheduler,但是这些确是Android开发中的精髓。

    RxLifecycle

    RxLifecycle

    The utilities provided here allow for automatic completion of sequences based on Activity or Fragment lifecycle events. This capability is useful in Android, where incomplete subscriptions can cause memory leaks.

    RxLifecycle提供了一些配合ActivityFragment生命周期使用的订阅管理的相关功能。例如使用RxJava执行一些耗时的操作,但是在执行过程中,用户退出了当前Activity,这时如果Observable未取消订阅就会导致内存泄漏,而RxLifecycle就是为了接着这些问题的。在Activity销毁的时候RxLifecycle会自动取消订阅。

    RxBinding

    RxBinding

    RxJava binding APIs for Android UI widgets from the platform and support libraries.

    RxBinding是把AndroidUI事件转换为RxJava的方式,例如点击时间,每次点击后Observable的订阅者Observer都会通过onNext()回调得知。

    Retrofit

    Retrofit

    Type-safe HTTP client for Android and Java by Square, Inc.

    良心企业Square出品的一个基于OkHttp的网络请求类库,完美支持RxJava

    SqlBrite

    SQLBrite

    A lightweight wrapper around SQLiteOpenHelper and ContentResolver which introduces reactive stream semantics to queries.

    良心企业Square出品的一个支持RxJavaSqlite数据库的操作库。

    RxPermissions

    RxPermissions)

    This library allows the usage of RxJava with the new Android M permission model.

    Android M上动态权限申请的类库。

    更多精彩文章请见:Github AndroidNote,欢迎Star

    相关文章

      网友评论

          本文标题:`RxJava Android`开发全系列

          本文链接:https://www.haomeiwen.com/subject/uiahvftx.html