My application has two EditText elements. Both implement the OnClickListener like this:
editText1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Open search dialog
doSomeStuff();
}
});
doSomeStuff()
means: Clicking on the text field opens a search dialog via onSearchRequested()
. The search result is written back to the text field.
This works fine but if I click the other text field I always have to click twice before the search dialog comes up. Where does that come from and how can I change that so that the search dialog comes up when clicking only once?