On activity A I have a button named btnA which will show an activity B whenever it is clicked.
But if I click on this btnA button too fast like 2 clicks within a second then 2 activity B will be shown. Obviously.
I know the solution for this is debouncing the on click listener of btnA using RxBinding or Kotlin coroutine...
But what if a have 100 views which all behave just like btnA in my app. How can I somehow override or intercept their on click listener to apply debouncing in one place?
Edit: I'm using Kotlin which mean I can add an extension function to apply the debounce logic over View's on click listener but that won't work if the click event handler is bound by ButterKnife or other alternatives library. That why I'm finding a way to override or intercept the View's click listener.
Also, creating some sort of root View/ base View which all app's View will extend from might be overkill, I think.
This might be impossible at the moment but somehow I have an urge that there is a solution somewhere out there.