Can you please tell me how can I create an android menu item using android setting icon?
Here is a list of the standard icons. I don't see a "settings" icon. Perhaps you mean "Preferences" (ic_menu_preferences)?
You can set the icon programmatically like this:
menu.add(0, MENU_QUIT, 0, "Quit").setIcon(R.drawable.menu_quit_icon); You can also set it in your xml layout like this:
<item android:id="@+id/save_button" android:icon="@android:drawable/ic_menu_save" android:title="Save Image"/> You can see all the icons in the android SDK forder:
_your_install_path_\android-sdk\platforms\android-10\data\res\drawable-hdpi\ and then get a reference to them with:
android.R.drawable.ic_menu_preferences just like it was your drawable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With