Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling Android menu button in PhoneGap Build

When creating an Android app using PhoneGap Build, how can I prevent the system from adding the menu button at the bottom of the screen?

enter image description here

From Disabling menu button in Android using PhoneGap, I got that when using pure PhoneGap, the solution appears to be to comment out the onCreateOptionsMenu function in MainActivity.java. However, when using PhoneGap Build, I obviously do not have access to any java files.

So what is the solution for PhoneGap Build?

  • Is there a special option that needs to be set in the config.xml?
  • Can it be disabled via the JavaScript event handler for the menu button?
  • Any other ideas?
like image 498
Ben Avatar asked Dec 04 '13 12:12

Ben


1 Answers

http://android-developers.blogspot.co.uk/2012/01/say-goodbye-to-menu-button.html mentions one solution that works for me:

...to ensure that the overflow action button never appears beside the system navigation, you should set the targetSdkVersion to 14.

Note also that:

...you can leave minSdkVersion at something much lower to continue supporting older devices.

The above can be set in the config.xml.

like image 199
Ben Avatar answered Sep 28 '22 08:09

Ben