RxFloatingActionButton 的使用

Usage of RxFloatingActionButton

在尝试使一些标准 Android 编程适应 RxBinding 时,我被困在 RxFloatingActionButton 上。 class 有一种方法,visibility(view),其中 returns 和 Consumer<Boolean>。然而 Javadoc 说 "The created observable keeps a strong reference to {@code view}." "created observable" 在哪里? 一个非常简短的用法示例将大有帮助。我假设要检测 FAB 上的点击,我会使用普通的 View click observable?

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

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

点击次数是 RxView.clicks()