[英]How to disable the dialpad soft keyboard in android?
我正在平板电脑模式下使用“电话”应用程序。我想在单击编辑文本时禁用软键盘。任何人都可以帮助我。
In your Manifest: 在您的清单中:
<activity android:name=".MainActivity"
android:windowSoftInputMode="stateHidden" />
Use this for hide 用这个藏起来
InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(edit.getWindowToken(), 0);
Use this for show 用这个来表演
InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.