Thursday 18 April 2013

key board raise and hide in Android


// -key board raise--
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm.isAcceptingText())
{
} else
{
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
// -key board hide--
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);

1 comment: