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

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
}
主站蜘蛛池模板: 嘉定区| 江孜县| 交口县| 桃园市| 大同县| 海原县| 霍城县| 射洪县| 邓州市| 东山县| 诸城市| 正定县| 兴义市| 德兴市| 民乐县| 淮阳县| 历史| 吐鲁番市| 铜梁县| 凤山市| 辽中县| 永春县| 洪湖市| 汉阴县| 读书| 花莲县| 易门县| 阳曲县| 鹤岗市| 栖霞市| 海盐县| 广德县| 泸定县| 易门县| 慈利县| 江油市| 吉安县| 县级市| 临夏县| 龙州县| 常德市|