Hiding the soft keyboard has always been a headache for me, and I haven't found a way to really hide it. The soft keyboard always pops up when you click EditText. -----Cups
Cup (a):
Java code
- Inputmethodmanager im = (inputmethodmanager) medit
- . GetContext (). Getsystemservice (Context.input_method_service);
- Im.hidesoftinputfromwindow (softkeytest. This.getcurrentfocus (). Getwindowtoken (),
- Inputmethodmanager.hide_not_always);
Cup (ii):
XML code
- <activity android:name=". Softkeytest "
- android:windowsoftinputmode="Statealwayshidden"//Join this line
- android:label="@string/app_name">
- <intent-filter>
- <action android:name="Android.intent.action.MAIN" />
- <category android:name="Android.intent.category.LAUNCHER" />
- </intent-filter>
- </Activity>
Cups (iii):
Java code
- Medit.setonclicklistener (new View.onclicklistener () {
- @Override
- public void OnClick (View v) {
- //TODO auto-generated method stub
- Don't come out, please.
- }
- });
One attempt, this parameter finally hides the soft keyboard:
Washing tool (a):
Java code
- EditText et= (EditText) Findviewbyid (R.id.edit);
- Et.setinputtype (Inputtype.type_null);
Android-----Completely hide the soft keyboard