Do something on the line
private void hideSoftKeyboard() {
InputMethodManager inputManager = (InputMethodManager) getBaseContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
if (inputManager != null)
inputManager.hideSoftInputFromWindow(getWindow().getDecorView().getWindowToken(), 0);
}
@Override
public boolean onTouch(View view, MotionEvent event) {
if(view == mWebView) {
hideSoftKeyboard();
}
return false;
}
source
share