0

In trying to adapt some standard Android programming to RxBinding I'm stuck on RxFloatingActionButton. The class has one method, visibility(view), which returns a Consumer<Boolean>. Yet the Javadoc says "The created observable keeps a strong reference to {@code view}." Where is the "created observable"? A very brief usage example would help greatly. I assume that to detect clicks on the FAB, I would use the normal View click observable?

4

1 回答 1

0
fabEnabledObservable.subscribe(RxFloatingActionButton.visibility(fab), /*handle error*/)

fabEnabledObservableObservable<Boolean>决定按钮是显示还是隐藏。

是的点击RxView.clicks()

于 2018-07-22T12:44:54.477 回答