【发布时间】:2017-10-11 14:02:03
【问题描述】:
我有一个布尔型 Observable。仅当当前布尔值与预览不同时,我才想发出值(另一个布尔值)。
booleanObservable
// which operator here
.subscribe(new Consumer<Boolean>() {
@Override
public void accept(Boolean emittedBoolean) throws Exception {
// do something with emittedBoolean
}
});
【问题讨论】:
-
Observable.distinctUntilChanged -
检查this问题。
-
@DeanXu 工作!谢谢