Monday, June 28, 2010

Re: [android-developers] soft keyboard

I found this to work for me:

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);


On Mon, Jun 28, 2010 at 3:36 PM, Lieuwe <lieuwe.elgersma@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment