How to create menu in Android?

-2

I'm trying to create a menu similar to this:

Can anyone explain how to ride? I would like some tips.

    
asked by anonymous 23.04.2014 / 22:08

2 answers

2

Guilherme is this even though @Piovezan said the android adjusts the amount according to the screen, but take a look here Implementing Navigation in the Android documentation itself.

Because this menu uses the "menu" button of the device and nowadays several models have no more. This can lead to user browsing issues.

The Motorola models and some Galaxy Tab with Android 4.x are already without this button.

Inthenewtemplateyoucancreateamenulikethis:

Hereinthegroup android-br has a discussion about, and more links too .

Worth a try.

    
25.04.2014 / 13:16
4

Are you having any specific difficulty? Because otherwise, just create a res/menu/menu.xml file with the menu items having each item a title and a drawable icon, as exemplified in own documentation :

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/new_game"
          android:icon="@drawable/ic_new_game"
          android:title="@string/new_game"
          android:showAsAction="ifRoom"/>
    <item android:id="@+id/help"
          android:icon="@drawable/ic_help"
          android:title="@string/help" />
</menu>

On appliances that do not have a physical menu button, it is recommended that you add a Action Bar to your activities and use the action overflow virtual button (item 3 this image ) as the menu button.

    
23.04.2014 / 22:18