The picture shows a part of my app, an AutoCompleteTextView
with an attached adapter.
When the user enters something into that view, autocomplete suggestions are shown.
The problem I have is: when the suggestions are shown and the device's down arrow is pressed, only the suggestions from the AutoCompleteTextView
are closed, the keyboard stays open and needs a second tap on the down arrow to disappear.
I do want the suggestions and the keyboard to disappear on the first tap on the down arrow.
I tried overriding onBackPressed
but it is not called when the down arrow is tapped, presumably because it's not considered 'back'.
How could I do this?
EDIT: I know how to programmatically hide the keyboard, I guess my problem is to detect the 'down arrow' tap.