On Fri, Sep 9, 2011 at 11:02 PM, martypantsROK <martyg...@gmail.com> wrote: > I am using > > confirmButton.setOnClickListener(new View.OnClickListener() { > public void onClick(View view) { > //hide keyboard : > > getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); > > // do stuff > } > }); > > but this doesn't hide the keyboard.
This is not surprising. > Is being inside the view of the button > affecting my ability to hide the keyboard in the parent window? No. The parent window doesn't have the keyboard in the first place. Use: InputMethodManager imm=(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v.getWindowToken(), 0); where v is the EditText that has the input method editor open. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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