Advertise with us

How to hide keyboard on outside tap for edittext, in android.

How to hide keyboard on outside tap for  edittext, in android.?
Last updated:2/27/2015 5:53:21 AM

1 Answers

Jayden Bell
Jayden Bell

On your activity you have need to add touch method like this :

      public boolean onTouchEvent(MotionEvent event) {
            // TODO Auto-generated method stub
            InputMethodManager inputManager =(InputMethodManager) getApplicationContext()
            return super.onTouchEvent(event);

Last updated:2/27/2015 5:53:21 AM