Chat List show/hide keyboard

    
_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

Popular posts from this blog

Drawing textured cube with Vulkan on Android

glTF loader for Android Vulkan

C++ unit testing & CI integration in GitHub (I/2)