JakeWharton / RxBinding

RxJava binding APIs for Android's UI widgets.
Apache License 2.0
9.69k stars 972 forks source link

How to control BottomNavigationView.onNavigationItemSelected click switch fragment #562

Closed lozn00 closed 2 years ago

lozn00 commented 2 years ago

有一个需求,我需要控制fragment切换避免操作太快,因为fragment的切换使用了动画,操作太快会出现重叠问题。但是缓慢点击或者不使用动画是没问题的, 这种怎么控制呢。 There is a requirement that I need to control the fragment switching to avoid too fast operation, because the fragment switching uses animation, and the overlapping problem will occur if the operation is too fast. But there is no problem clicking slowly or not using animation. How to control this.

JakeWharton commented 2 years ago

I'm not sure that this is a question specific to RxBinding. It seems like a general-purpose question that would occur if you were simply using callbacks. Going to close since this isn't the right place to give any advice for this. For one, I do not use Fragments.

lozn00 commented 2 years ago

thank you

lozn00 commented 2 years ago

I just want to implement controls such as bottomnav to limit the frequency of switching fragments. I hope it can be implemented with rxbind, because it is also similar to the click of view,