Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable menubutton in the android emulator

When developing applications for ICS - the actionbar looks different depending on if there is a physical menubutton present on the device or not.

For example if not, a virtual button is displayed in the actionbar.

Is it possible to emulate a device without a menubutton by disabling it somehow in the emulator?

like image 980
Jakob Eriksson Avatar asked Dec 12 '11 15:12

Jakob Eriksson


4 Answers

Open the AVD Manager, ClickShow on Diskoption, Edit theconfig.inifile from the opened directory, findhw.mainKeysconfig and set it toyes`

hw.mainKeys = yes

Save the file and restart the AVD.

Refer screenshots below for more details enter image description here enter image description here

like image 64
Vivek Avatar answered Sep 20 '22 18:09

Vivek


As @Yenchi said, tick on 'hw.mainKeys'. The virtual device will look like second picture.

enter image description here enter image description here

like image 38
Chandler Avatar answered Sep 22 '22 18:09

Chandler


With updated SDK tool (R22 as of this answer), the AVD manager editor no longer expose these options on the UI. You have to edit the config.ini of your AVD manually and change the following key from

hw.mainKeys=yes

to

hw.mainKeys=no

like image 39
Yenchi Avatar answered Sep 22 '22 18:09

Yenchi


There is an option "hardware back/home keys". Specify the option and set it to "no" when creating the virtual device.

like image 36
Stefan Avatar answered Sep 22 '22 18:09

Stefan