官术网_书友最值得收藏!

Rebuilding our application with RxJava

To get a feel for RxJava, let's rewrite the previously written temperature sensing application with RxJava. To use the library in the application, let's add the following dependency to the build.gradle file:

compile('io.reactivex:rxjava:1.3.8')

Here, we are using the same value class to represent the current temperature, as shown in the following code:

final class Temperature {
private final double value;
// constructor & getter
}
主站蜘蛛池模板: 德惠市| 黎川县| 云龙县| 宁乡县| 五原县| 尤溪县| 玛纳斯县| 双牌县| 永清县| 大方县| 新绛县| 永顺县| 富裕县| 旬邑县| 达日县| 洪湖市| 岳普湖县| 西华县| 连山| 镇巴县| 紫金县| 曲水县| 西藏| 温宿县| 错那县| 安泽县| 秦皇岛市| 扎兰屯市| 抚远县| 万安县| 寿光市| 舞钢市| 普兰店市| 漾濞| 满城县| 台东市| 邓州市| 额尔古纳市| 江川县| 高碑店市| 集安市|