隐藏虚拟键盘的Android? [英] hide virtual keyboard in android?
本文介绍了隐藏虚拟键盘的Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不会想显示虚拟键盘,即使用户触摸EDITTEXT领域。
Hi i won't want to show virtual keyboard even user touch the editText field.
推荐答案
你有没有尝试添加机器人:configChanges =键盘| keyboardHidden到你的活动
Have you tried adding android:configChanges="keyboard|keyboardHidden" into your activity?
例如:
<activity android:name=".MyApp" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden">
不知道它是否适用于屏幕上的键盘,以及一个物理的。
Not sure if it applies to the onscreen keyboard as well as a physical one.
您也可以乱用使用InputMethodManager的屏幕键盘,例如隐藏它,你可以使用:
Also you can mess with the On Screen Keyboard using the InputMethodManager, for example to hide it you could use:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mCurretnView.getWindowToken(), 0);
这篇关于隐藏虚拟键盘的Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文