Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

menu button doesn't show on nexus 7

Tags:

android

so I am facing this problem for long time. I've got Nexus 4 and Nexus 7 both running Android 4.3, and i've got application with targetSdkVersion="11"("I use 11 because any target sdk below 11 doesn't support multitouch for me). And the problem is that 3-dot menu shows on Nexus 4 but doesnt show on Nexus 7. 3 dot menu button on nexus 7 works only if I put targetSdkVersion="8" but then multitouch doesnt work

Nexus 4: enter image description here

Nexus 7 : enter image description here

code :

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="11" />

screenshots : nexus 7enter image description here

nexus 4: enter image description here

like image 974
user1798049 Avatar asked Nov 02 '13 20:11

user1798049


People also ask

How do I fix my Nexus 7 no command?

An image of the Android robot and a red exclamation point with the message No Command will appear. Next, hold down the Power button and press the Volume Up button once. Select Wipe Data/Factory Reset by pressing the Volume Down button twice and then the Power button.

How do I fix my Nexus 7 tablet?

If that's the case, here's what you need to do to fix your Nexus 7 tablet: While holding both Volume buttons, plug in the charger and keep them pressed for another 40 seconds. Release the Volume buttons then press and hold the Power button for another 40 seconds to boot up. Your Nexus 7 should boot up normally now.

How do I reset my Google Nexus?

While holding down the Power button, press and release Volume Up. Use the volume keys to scroll to wipe data/factory reset and press the Power button to select it. Scroll down to Yes - erase all user data and press the Power button to select it. Your device will reset to factory settings.


2 Answers

In case you are specifically wondering why the button is not being shown the following rules apply when Android determines if a legacy menu button is needed:

  • If target API version is less than 11 it is shown on all devices
  • If target version is 11, 12, or 13 (i.e. tablet-only Honeycomb) Android assumes that your app has been designed for tablets and won't show a legacy button on tablets, but will on phones
  • If target is 14 or above (ICS and above), Android assumes your app is designed for tablets and phones and so the legacy button isn't shown.

But like the other answers say, you shouldn't be using this menu button. If you don't want an entire ActionBar, another option would to have a three-dot button in your activity which shows a menu using PopupMenu.

like image 115
Alex Curran Avatar answered Oct 09 '22 01:10

Alex Curran


You should not be using that menu anymore. From the Menus documentation:

On Android 3.0 and higher, items from the options menu are presented by the action bar as a combination of on-screen action items and overflow options. Beginning with Android 3.0, the Menu button is deprecated (some devices don't have one), so you should migrate toward using the action bar to provide access to actions and other options.

Use an ActionBar.

like image 39
Catherine Avatar answered Oct 09 '22 01:10

Catherine