In menu.xml you can specify an icon:
<item android:id="@+id/settings_menu_item"
                  android:title="@string/settings_menu_label"
                  android:alphabeticShortcut="@string/settings_menu_shortcut"
                  android:icon="@android:drawable/ic_menu_preferences" />

Whereas in code you create entries thus:
        menu.add(0, MENU_ABOUT, MENU_ABOUT, R.string.menu_about);

How in the code version do you specify the icon please?

--
Android Academy: http://www.androidacademy.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to