I know you say it's a requirement, but those requirements just aren't going to be possible. Firstly, there's no callback or method to check or watch the visibility of the input method. There are some hacks out there that people will suggest, but they're just that -- hacks. You shouldn't rely on them.
Secondly, as for your focus traversal, fortunately Android has pretty good built in support for that sort of thing. Look at the nextFocusDown
and similar attributes on TextView/EditText. In most cases you don't even have to specify these as Android is quite good at figuring out the right order for you. If you need to do it programmatically, you can use the requestFocus()
method:
editText.requestFocus(View.FOCUS_DOWN);
Or you can use FOCUS_UP
to go to the previous view.
EDIT: Also, you can use the attribute inputType="text|textNoSuggestions" to get rid of the suggestions bar on most input methods (although they are not required to respect it, and many don't).