Android 如何让安卓模拟器显示软键盘?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10238769/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I make the Android emulator show the soft keyboard?
提问by blahdiblah
I'm debugging an issue with the soft keyboard display not displaying when it should. However, I don't have a device handy for testing. The problem is that the emulator nevershows the soft keyboard.
我正在调试软键盘显示不应该显示的问题。但是,我手边没有用于测试的设备。问题是模拟器从不显示软键盘。
Some skins have a keyboard constantly displayed on the right, some don't, but none that I've tried so far has ever shown a keyboard on the device screen.
有些皮肤的右侧经常显示键盘,有些则没有,但到目前为止,我尝试过的所有皮肤都没有在设备屏幕上显示过键盘。
Is there some setting that I missed?
有什么我错过的设置吗?
回答by JoxTraex
I found out how to do this on the emulator itself. All you need to do is:
我发现了如何在模拟器上执行此操作。您需要做的就是:
open settings app -> Language & Input -> Go to the "Keyboard & Input Methods -> click Default
打开设置应用程序 -> 语言和输入法 -> 转到“键盘和输入法” -> 单击默认
This will bring up a Dialog in which case you can then disable the Hardware Keyboard by switching the hardware keyboard from on to off. This will disable the Hardware keyboard and enable the softkeyboard.
这将打开一个对话框,在这种情况下,您可以通过将硬件键盘从打开切换到关闭来禁用硬件键盘。这将禁用硬件键盘并启用软键盘。
回答by Dr. Spam
If you're using AVD manager add a hardware property Keyboard support and set it to false.
如果您使用 AVD 管理器,请添加硬件属性键盘支持并将其设置为 false。
That should disable the shown keyboard, and show the virtual one.
那应该禁用显示的键盘,并显示虚拟键盘。
回答by Joe Mellin
回答by Ashwini Belsare
Settings > Language & input > Current keyboard > Hardware Switch ON.
设置 > 语言和输入 > 当前键盘 > 硬件开启。
This option worked.
这个选项有效。
回答by vovahost
Settings > Language & input > Current keyboard > Hardware Switch ON.
It allows you to use your physical keyboard for input while at the same time showing the soft keyboard.
I just tested it on Android Lollipop and it works.
设置 > 语言和输入 > 当前键盘 > 硬件开启。
它允许您使用物理键盘进行输入,同时显示软键盘。我刚刚在 Android Lollipop 上对其进行了测试,并且可以正常工作。
回答by vortex.alex
To be more precise, with Lollipop these are the steps I followed to show soft keyboard:
更准确地说,使用 Lollipop 这些是我用来显示软键盘的步骤:
- Settings > Language & Input;
- under "Keyboard & input methods" label, select "Current Keyboard";
- A Dialog named "Change Keyboard" appears, switch ON "Hardware", then select "Choose keyboards";
- another Dialog appears, switch ON the "Sample Soft Keyboard". Here you get an alert about the possibility that keyboard will store everything you write, also passwords. Give OK;
- Repeat above steps in order to show "Change Keyboard" Dialog again, here the new option "Sample Soft Keyboard" is available and you can select it.
- 设置 > 语言和输入法;
- 在“键盘和输入法”标签下,选择“当前键盘”;
- 出现一个名为“更改键盘”的对话框,打开“硬件”,然后选择“选择键盘”;
- 出现另一个对话框,打开“示例软键盘”。在这里,您会收到有关键盘可能会存储您所写的所有内容以及密码的警报。给 OK;
- 重复上述步骤以再次显示“更改键盘”对话框,这里新选项“示例软键盘”可用,您可以选择它。
NOTE: after that, you might experience problems in running you app (as I had). Simply restart the emulator.
注意:在那之后,您可能会在运行应用程序时遇到问题(就像我一样)。只需重新启动模拟器。
回答by Insan R.
- Edit your virtual device using AVD.
- Press the "show advance setting" button to show more option scroll
down to the bottom and check "Enable keyboard input" press "finish" button
at the bottom corner of your window - then start the emulator device that you just set up.
- inside the emulator, go to the "Settings" -> "Language & Input"
- and in the "Keyboard & Input Methods" -> "Default" then "choose input method" is shown
- and switch off "Hardware Physical Keyboard" toggle button
- 使用 AVD 编辑您的虚拟设备。
- 按“显示高级设置”按钮以显示更多选项向下滚动到底部并选中“启用键盘输入”按
窗口底角的“完成”按钮 - 然后启动你刚刚设置的模拟器设备。
- 在模拟器内,转到“设置”->“语言和输入”
- 并在“键盘和输入法”->“默认”中显示“选择输入法”
- 并关闭“硬件物理键盘”切换按钮