I found this to work for me: getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
(found here: http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard ) On Mon, Jun 28, 2010 at 3:36 PM, Lieuwe <[email protected]> wrote: > Hi, > > I've got a problem with my application in that the soft-keyboard is > not being closed unless the user pushes the "back" button. > > I use several layouts which I load using the setContentView method of > the application. Some layouts contain multiple EditText fields. The > soft-keyboard pops up correctly when the entry boxes are being > clicked, but never gets dismissed, even after I switch to a new layout > using setContentView (instigated by on-screen push buttons). > > I found a way of apparently removing the keyboard using the > "InputManager" class but how exactly does that work if I don't know > which entry field opened/currently owns the keyboard? > > Is there a way of possibly invalidating a whole layout which would > perhaps cause all resources (and hopefully the keyboard) to be > cleared? As said before, I currently just use setContentView to load > the next screen. > > Cheers > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- YuviDroid http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

