2

I have an app in which I want to turn the menu button off (I'm picking up someone else's project and am not sure what is provoking the menu button to appear)... it doesn't *do anything. Is there a way to turn off that icon manually? Or do I have to hunt down the reason for its being displayed in the first place? (please no flak for looking for a workaround, obviously in an ideal world I'd be familiar enough with the code to know why the menu button is being generated, but time is of the essence and since it's a non functional button, I see no harm in just forcing it to go away).

TIA

Programmer Bruce
  • 64,977
  • 7
  • 99
  • 97
Yevgeny Simkin
  • 27,946
  • 39
  • 137
  • 236

2 Answers2

1

Based on a suggestion here:

http://groups.google.com/group/android-developers/browse_thread/thread/c4b1b835060bd93f/4ed12919b4147008

I managed to get rid of the menu button on Honeycomb by setting my targetSdkVersion to 11 in my manifest:

android:targetSdkVersion="11"

If you do end up implementing some menu options, I believe they will end up being put into the little widget at the top right (don't know what it's called).

Rico Yao
  • 971
  • 7
  • 9
0

Is there a way to turn off that icon manually?

Don't have an options menu -- IOW, don't implement onCreateOptionsMenu() or onPrepareOptionsMenu(). Having an options menu is the only thing that causes the options menu button to appear on Honeycomb, AFAIK.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • That was my understanding as well, but I've grepped the source folder and neither of those strings appear in any of the code, and yet the menu button does appear. Very frustrating. – Yevgeny Simkin Apr 15 '11 at 18:04
  • 3
    My understanding is that the menu button is *always* visible for projects that were built against a pre-3.0 version of the SDK because the menu button was a required hardware feature before that point. It's possible to implement a menu manually without using onCreateOptionsMenu (see: games) so the system just always shows the button for those projects because it *might* be needed. – chefgon Nov 15 '11 at 12:59