Skip to main content

Posts

Showing posts from February, 2018

How to close or hide the android soft Keyboard

Solution: You can force the android to close the virtual keyboard. hideSoftInputFromWindow function to close the virtual keyboard Code: View myview = this . getCurrentFocus (); if (myview != null ) { InputMethodManager inm = ( InputMethodManager ) getSystemService ( Context . INPUT_METHOD_SERVICE ); inm . hideSoftInputFromWindow ( view . getWindowToken (), 0 ); }