Hi, Is there an easy way to have soft input methods automatically closed as soon as the user taps _anywhere_ outside of the corresponding EditText? Sometimes it's not very convenient if the soft input method stays on the display when the user starts performing other actions in the same activity.
The only way I've found so far is to set an OnTouchListener on my EditText that sets a certain flag to true, and then override my Activity's dispatchTouchEvents to check if that flag was modified during the default dispatching of the touch event (i.e., to detect if it was the EditText that was touched or if it was any other view) and if it wasn't I call InputMethodManager.hideSoftInputFromWindow. This approach seems a bit complex. Is there any better way, i.e., is there any input method flag or similar that gives me this behaviour automatically? BR /Henrik -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en