Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show menu button on Android 3.0?

Tags:

android

Currently, I use the phone's menu button to trigger a custom event. On Android 3.0 on the XOOM tablet the menu button does not show. How can I make the button available?

like image 880
Jona Avatar asked Apr 18 '11 16:04

Jona


People also ask

How do I get the menu button on my Android?

Look for a tiny column of three dots in a corner of the screen, or sitting at the bottom of the display. Tap the three dots, and you'll get a new batch of menu options, just like you would with the physical Menu key on older Android phones.

Where is the menu bar on Android?

Android ActionBar is a menu bar that runs across the top of the activity screen in android. Android ActionBar can contain menu items which become visible when the user clicks the “menu” button.

How do I show the pop up menu on Android?

Go to app > res > right-click > New > Android Resource Directory and give Directory name and Resource type as menu. Now, we will create a popup_menu file inside that menu resource directory. Go to app > res > menu > right-click > New > Menu Resource File and create a menu resource file and name it as popup_menu.

How do I open the menu mode?

To find the Android Quick Settings menu, just drag your finger from the top of your screen downward. If your phone is unlocked, you'll see an abbreviated menu (the screen to the left) that you can either use as-is or drag down to see an expanded quick settings tray (the screen to the right) for more options.


2 Answers

I believe you just don't target Honeycomb. I.e., android:targetSdkVersion="X" where X is less than 11 (and android:minSdkVersion too!)

This will cause your application to be considered a phone application, and the soft menu button will appear.

You should be asking yourself why you want this functionality on a tablet, though.

like image 154
Jon Willis Avatar answered Oct 03 '22 23:10

Jon Willis


You can also detect whether the MENU button is present with this:

ViewConfiguration.get(context).hasPermanentMenuKey()

And if not, you can show a custom menu button in your UI.

like image 20
fhucho Avatar answered Oct 04 '22 00:10

fhucho