JakeWharton / RxBinding

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

RxView.clicks needs tow clicks #556

Closed mlsem closed 3 years ago

mlsem commented 3 years ago

This is more like a question more than an issue.

I am using RxView.clicks with ImageButton component to handle some UI changes of some other ImageButton ( change color selector, background). and for some reason i need to perform tow clicks to make to see changes

Maybe its not a real issue but i choose to share this question.

JakeWharton commented 3 years ago

The clicks extension is just wrapping the OnClickListener of the view. If you need two clicks to see changes it's likely that something in the Rx stream requires it. The tests for the clicks extension all show that a single click is all that's needed to get an emission. Perhaps add some doOnNext operators with logging to figure out where the events are being lost.