I’ve an activity that displays a view. The view consists of various widgets, one of which is a multiline EditText. When the view is inflated the softkeyboard comes up how can i disable it?
Things i have tried:
removing the following from the layout from within the EditText.
<requestFocus />
.
creating the following method then calling it from the oncreate method (resolution is the EditText).
private void hideSoftKeyboard() {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(resolution.getWindowToken(), 0);
}
Add this to your manifest file
as