How to configure the Android Emulator to show onscreen buttons like the new Galaxy Nexus?

前端 未结 5 1583
余生分开走
余生分开走 2021-02-01 02:22

I would like to convert/adapt my application to Android 4.0. To do so I plan to use the ActionBar on devices that support it. All Android version >= 3.0 do so. Furthermore devi

相关标签:
5条回答
  • 2021-02-01 02:42

    If your application includes functionality that would respond to a menu button, the menu button will be added to the black bottom bar.

    If you are having trouble seeing this in the emulator, you can do a bit of a workaround by setting it to a tablet resolution (I use 1280x800) and observing your menu button behavior there, as it should be the same as on the phone version.

    0 讨论(0)
  • 2021-02-01 02:46

    When you create new emulator there is grid Hardware, and there you can add options Hardware home and back buttons and Hardware keyboard. So, create new emulator and look at your "Galaxy Nexus" :)

    Unfortunately you can't change this properties for existing emulator.

    0 讨论(0)
  • 2021-02-01 02:52

    It seems the issue was fixed with the latest update of the SDK (R16). Just update your SDK and ADT to R16 and create a new emulator using the updated Android 4.0 system image.

    0 讨论(0)
  • 2021-02-01 02:58

    The soft keys showed up for me when I set hw.mainKeys to no:

    1. Open $HOME/.android/avd/YOURS.avd/config.ini
    2. Set hw.mainKeys=no

    (This was covered in a deleted answer; don't know why it was deleted.)

    0 讨论(0)
  • 2021-02-01 03:03

    After upgrading to R16 I could only get the on-screen buttons to appear if I created an emulator using the WXGA720 resolution.

    Here is my complete config.ini file:

    hw.sdCard=yes
    hw.mainKeys=no
    hw.lcd.density=320
    disk.cachePartition.size=256MB
    hw.cpu.arch=arm
    skin.name=WXGA720
    sdcard.size=512M
    abi.type=armeabi-v7a
    image.sysdir.2=system-images\android-16\armeabi-v7a\
    image.sysdir.1=add-ons\addon-google_apis-google-16\images\armeabi-v7a\
    hw.gps=yes
    skin.path=platforms\android-16\skins\WXGA720
    hw.keyboard.lid=no
    hw.cpu.model=cortex-a8
    vm.heapSize=48
    hw.ramSize=1024
    

    Hopefully this helps someone.

    0 讨论(0)
提交回复
热议问题