Once you use the trackball (or indeed press any other key on the keyboard), you exit touch mode. From that point on, there will be some view that has focus (you can see this by calling Activity.getCurrentFocus()
). This mode persists until you touch the screen again, at which point you will re-enter touch mode and when you open the menu on subsequent occasions there will not be a focused item. This happens in every single Android application I have seen with a menu.
This situation exists not only for option menu items, but also for views in your layout. Once you leave touch mode, I don't think there is a way to enter it again (and hence remove focus from all views) unless you touch the screen. A solution I have seen cited for removing the visible effects of focus (when not in touch mode) is to simply give it to an element which is not visible. Could you create an invisible menu option and give it focus when you want to clear it?
Unless you find a way to programmatically, reliably enter touch mode or to remove focus from all views (calling View.clearFocus()
just passes it to another view!), this may be your best bet.