i am using AutoCompleteTextView in my Activity and i need it's DropDownList to be shown all the time (it's the only View in Window), even after Back key press. I need to dismiss soft keyboard instead.
I tried to override Activity's onBackPressed method, but it's not used at all, so BackPressed event is being handled somewhere "higher". So i tried to find out where, but AutoCompleteTextView has no onBackPressed method defined.
Any advices?
You may try this
Remember to return true to prevent this event from being propagated further, or false to indicate that you have not handled this event and it should continue to be propagated.
You can create your custom AutoCompleteTextView and Override the method onKeyPreIme(int keyCode, KeyEvent event)
I also realized that this method is called 2 times, I'm running my code only in the second time. Here is the example: