Did you try passing 0 in for flags instead of HIDE_NOT_ALWAYS? Also note that only the window that currently has input focus can control the IME.
On Sat, Aug 21, 2010 at 11:46 AM, John Gaby <jg...@gabysoft.com> wrote: > I have several pages which are implemented using the ViewGroup class. > I display a particular page by calling: > > setContentView(vg); > > Now if I go to a page which has an edit control, and touch within the > control, the virtual keyboard is presented. If I now navigate to > another page (and do a new setContentView) the virtual keyboard > remains in place. How do I dismiss that keyboard programatically? I > have tried the following with out success: > > InputMethodManager inputManager = (InputMethodManager) > this.getSystemService(Context.INPUT_METHOD_SERVICE); > > inputManager.hideSoftInputFromWindow(vg.getWindowToken(), > InputMethodManager.HIDE_NOT_ALWAYS); > > and also > > > > getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); > > Any Idea? > > Thanks > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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