0

有没有办法限制方法调用,即只在某个窗口持续时间内接受第一个事件。我见过 RxBinding 的例子,比如

RxView.clicks(mButton)
            .throttleFirst(300, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread())
            .subscribe(...);

我怎样才能对方法进行上述操作?

4

1 回答 1

0

在 RxJava2 中有这样的运算符 - http://reactivex.io/documentation/operators/sample.html

于 2018-11-22T07:38:40.830 回答