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

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
}
主站蜘蛛池模板: 贡觉县| 理塘县| 金沙县| 大田县| 新源县| 台州市| 紫金县| 开封市| 天津市| 洪泽县| 郓城县| 金湖县| 泰和县| 昂仁县| 奇台县| 交城县| 九江县| 灵山县| 蓬莱市| 淄博市| 双城市| 巴楚县| 台北市| 咸阳市| 广南县| 卓尼县| 都江堰市| 天等县| 蕉岭县| 获嘉县| 延吉市| 河西区| 鹤庆县| 彭水| 丹寨县| 仙桃市| 宝清县| 大足县| 吉水县| 昭苏县| 新干县|