I followed this tutorial to create a menu
but my menu looks differently:

How can I create a menu with images?
This is my code:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/preferences"
android:icon="@drawable/preferences"
android:title="Preferences" />
<item android:id="@+id/help"
android:title="Help"
android:icon="@drawable/ic_action_search" />
</menu>
@Override
public boolean onCreateOptionsMenu(Menu menu) {
/*menu.add(Menu.NONE, PREF_ID, Menu.NONE, "Preferences")
.setIcon(R.drawable.preferences).setAlphabeticShortcut('e');
return (super.onCreateOptionsMenu(menu));*/
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.activity_ygo_main, menu);
return true;
}
First of all I want to say : Say Goodbye to the Menu Button
Your code have no problem, and it should be showing the icons if the drawables are there in correct folder,Working fine on Android 2.2.
The Menu features says :
No problem with your code, Problem may be with the API level you are using, but still want to suggest that don’t use Menu anymore.
Android no longer requires a dedicated Menu button, some devices don’t have one, and you should migrate away from using it.