Thursday, November 8, 2012

Programmatically Hide Android SIP

Some times we want to programmatically hide the virtual keyboard (SIP, soft input panel).

This is how you do it:
InputMethodManager IMM = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); 
IMM.hideSoftInputFromWindow(v.getWindowToken(), 0);
In the code, the V variable may represent any view of the activity.

No comments:

Post a Comment