_chatList.setOnTouchListener( new OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
(
//close keyboard
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(
_chatText.getWindowToken(), 0);
//open keyboard
((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(chatText,
InputMethodManager.SHOW_FORCED);
return false;
}
});
http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard
Comments
Post a Comment