So I have a button in my app and an edittext. When I click the button and write something in the edittext, a textview changes. It all works as it should except for one thing
If you are inflating view to another one, try to set on parent view:
view.setFocusable(false);
worked for me.
I had the same problem as the OP. I tried all the focus-related suggestions, but none of them worked every time for me.
I tried removing the NavigationDrawer
from my layout, but that didn't work.
Lastly, I tried replacing my CoordinatorLayout
with a LinearLayout
and now my buttons click first time every time. Could be worth a try.