rxbinding防抖動(dòng)無(wú)效什么原因 財(cái)富值14

科技 未結(jié) 3 1934
ty_134955438
ty_134955438 2022-09-20 13:35

RxView.clicks(activityNewsButton) .throttleLast(1000,TimeUnit.MICROSECONDS) .subscribe(new Action1<Void>() { @Override public void call(Void aVoid) { System.out.println("click"); } });

經(jīng)過(guò)調(diào)試,這樣子還是會(huì)輸出很多個(gè)click,好像并沒(méi)有成功防抖動(dòng),為什么
還有compoundbutton也不能實(shí)現(xiàn)這個(gè)功能

RxCompoundButton.checkedChanges(schoolBusSwitchButton) .throttleLast(1000, TimeUnit.MICROSECONDS) .subscribe(new Action1<Boolean>() { @Override public void call(Boolean aBoolean) { System.out.println("switch"); } });

3條回答
提交回復(fù)