I have an EditText field. When I set onClickListener on it, it will require first the focus on the field and then the click to call the listener. So it’s actually two clicks to call the listener. How can I fix this to work from the first click? I don’t want to set focusable to false because then the program won’t work.
Share
As others have said, the first touch focuses the view, the second touch “clicks” it. Instead of implementing
OnClickListener, implementOnFocusChangeListener. e.g.