23

So I'm working on an update for my application from 3.0 to 4.0 and I'm having issues with the emulator. Specifically, the software buttons do not appear when using the Galaxy Nexus~ish skin (I'm not sure its exact, but it should be close enough).

This is the WXGA720, its values:

Hardware Back/Home keys = no
Abstracted LCD Density = 320
Keyboard Lid Support = no
Max VM Heap = 48
Device Ram Size = 1024

The first line is the most important, because it tells the emulator we need software keys for back/home. This works using the WXGA800 skin (tablet) - even using API level 14 (ICS).

Screenshot of missing keys (Don't mind the jaged edges in the screenshot, I have the emulator scaled down - this doesn't affect the keys not appearing) As you can see its difficult to interact with the emulator since I have no back/home buttons.

So the software keys show up for the tablet skin but not the phone. Has anyone else solved this issue?

EDIT

I've changed the screenshot to reflect the latest version of the tools, r16. The buttons appear using the WVGA800 skin and hardware back/home = no.

smith324
  • 13,020
  • 9
  • 37
  • 58

5 Answers5

28

Use your Keyboard's "Home" for Home, "Esc" for back and "Page Up" for Menu.

Abhinav Manchanda
  • 6,546
  • 3
  • 39
  • 46
  • 3
    Neither are really acceptable. I need to ensure the menu key appears when appropriate / or I have it available in the action bar. – smith324 Dec 06 '11 at 16:25
  • 2
    On a Mac: ESC is back, FN and left arrow is home, FN and up arrow brings up the tab at the bottom with search, settings etc. (OSX 10.7 - ADT Build: v21.1.0-569685) – Mick Mar 21 '13 at 18:30
17

You can get the software keys up if you edit the AVD's "config.ini" file. I don't know where this is in windows, but in linux it's ~/.android/avd/.avd/config.ini

You need to put in these lines (not sure if you need to put in all 3):

hw.mainKeys=no
hw.keyboard=no
hw.dPad=no
old486whizz
  • 171
  • 2
15

Here's a workaround that works for me: create your AVD by selecting the WXGA720 preset for the Skin, but before you click the "Create AVD" button, click on the "Resolution" radio button for the Skin and enter 720 x 1280 manually on the provided inputs.

You might also want to make sure that you add "Keyboard support: no" and "DPad support: no" in the Hardware section.

Joe
  • 14,039
  • 2
  • 39
  • 49
9

On a MacBook air (which has no Home or Page Up keys) use the fn key + arrows:

  • fn + Left Arrow = "Home Button"
  • fn + Up Arrow = "Menu Button"
  • esc = "Back Button"
Marko
  • 20,385
  • 13
  • 48
  • 64
Tim T
  • 361
  • 3
  • 7
4

I needed to add the following to my AVD's config.ini file:

skin.dynamic=yes

This can also be set via the AVD Manager GUI by checking Skin: Display a skin with hardware controls, see screenshot below:

enter image description here

This is for ADT Build: v21.0.1-543035

HeatfanJohn
  • 7,143
  • 2
  • 35
  • 41