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

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
}
主站蜘蛛池模板: 钟山县| 珠海市| 威信县| 凉山| 中西区| 锡林郭勒盟| 铜山县| 江阴市| 高阳县| 台东县| 镇原县| 荣昌县| 隆尧县| 吉安市| 吉首市| 南安市| 渑池县| 泰顺县| 嘉禾县| 南澳县| 宜阳县| 嘉义县| 天全县| 曲周县| 河北区| 始兴县| 花莲市| 且末县| 抚远县| 政和县| 新余市| 安化县| 肇庆市| 什邡市| 会泽县| 澜沧| 六盘水市| 巴东县| 佛冈县| 象州县| 万荣县|