Edittext disables android soft keyboard pop-up and edittext disables android
1.
EditText ed = (EditText) findViewById (R. id. test );
Ed. clearFocus ();
2.
In AndroidMainfest. xml, select the activity and set the windowSoftInputMode attribute to adjustUnspecified | stateHidden.
Example: <activity android: name = ". Main"
Android: label = "@ string/app_name"
Android: windowSoftInputMode = "adjustUnspecified | stateHidden"
Android: configChanges = "orientation | keyboardHidden">
<Intent-filter>
<Action android: name = "android. intent. action. MAIN"/>
<Category android: name = "android. intent. category. LAUNCHER"/>
</Intent-filter>
</Activity>
3.
Force hide Android Input Method window
For example, EditText edit = (EditText) findViewById (R. id. edit );
InputMethodManager imm = (InputMethodManager) getSystemService (Context. INPUT_METHOD_SERVICE );
Imm. hideSoftInputFromWindow (edit. getWindowToken (), 0 );
4.
EditText always does not pop up the software keyboard
Example: EditText edit = (EditText) findViewById (R. id. edit );
Edit. setInputType (InputType. TYPE_NULL );
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.