如何让 Android 模拟器显示软键盘?

我正在调试一个软键盘显示器在应该显示的时候没有显示的问题。但是,我手头没有用于测试的设备。问题是 模拟器 < em > never 显示软键盘

有些皮肤的键盘会一直显示在右边,有些则不会,但是到目前为止我还没有尝试过在设备屏幕上显示键盘。

我是不是错过了什么?

121844 次浏览

If you're using AVD manager add a hardware property Keyboard support and set it to false.

That should disable the shown keyboard, and show the virtual one.

I found out how to do this on the Android emulator itself (Menu, "Settings" App - not the settings of the emulator outside). 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.

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.

To be more precise, with Lollipop these are the steps I followed to show soft keyboard:

  1. Settings > Language & Input;
  2. under "Keyboard & input methods" label, select "Current Keyboard";
  3. A Dialog named "Change Keyboard" appears, switch ON "Hardware", then select "Choose keyboards";
  4. 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;
  5. 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.

NOTE: after that, you might experience problems in running you app (as I had). Simply restart the emulator.

Settings > Language & input > Current keyboard > Hardware Switch ON.

This option worked.

  1. Edit your virtual device using AVD.
  2. 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
  3. then start the emulator device that you just set up.
  4. inside the emulator, go to the "Settings" -> "Language & Input"
  5. and in the "Keyboard & Input Methods" -> "Default" then "choose input method" is shown
  6. and switch off "Hardware Physical Keyboard" toggle button

Here are the steps:

  • => Settings
  • => Language and Input
  • => Default
  • => Hardware Physical Keyboard
  • => off to turn on the On Screen Keyboard

Settings =>Language and Input

Select Default

Hardware Physical Keyboard => off

There is a bug in the new version of NOX app. Software keyboard doesn't work after switching to it in settings. To fix this, I installed Gboard using the Play Market.

Go to Tools > AVD Manager > Click on ▾ on the Respective Emulator and > Wipe Data and Restart, will solve the problem on New Android Studio.