I need disable open softkeyboard in my WebView and in all edittexts in WebView (I do not access to thay because its is in WebView).
I try use \'android:windowSoftInp
For the keyboard hidden state:
public void hideSoftKeyboard(View v) {
Activity activity = (Activity) v.getContext();
InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
}
To disable the EditTexts:
Set android:editable="false" in the layout of them EditText.setFocusable(false) in the activity.
EDIT:
To detect the click event in the WebView use this:
mWebView.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
// The code of the hiding goest here, just call hideSoftKeyboard(View v);
return false;
}
});