1. If you don't already have an Android project, create a project.
2. Add an Action Bar.
3. Open the res/menu/menu.xml file and add the below lines in bold.
This will add the add icon, which came standard with your Android SDK.
The android:icon line adds the icon.
The android:showAsAction will display the icon if there is room on the device. Smaller devices may not have room depending on how many icons may be displayed.
<item
android:id="@+id/menu_add"
android:icon="@android:drawable/ic_input_add"
android:showAsAction="ifRoom"
android:title="Add" />
4. Compile and run!
Other icons you may want to use that come standard with your Android SDK are listed visually on this page below.
or here
http://androiddrawables.com/menu.html
Other icon names:
ic_menu_archive.png
How many icons will fit on your screen?
Depends on your device. See this page for some examples:
http://developer.android.com/design/patterns/actionbar.html
http://androiddrawables.com/menu.html
Other icon names:
ic_menu_archive.png
How many icons will fit on your screen?
Depends on your device. See this page for some examples:
http://developer.android.com/design/patterns/actionbar.html