Can I use an image from the system on a button or do I have to draw my own?
I have a delete button which I'd like to have as a wastepaper basket icon. Similar to the one at the bottom of the home screen which appears when you hold down a shor开发者_JAVA百科tcut.
Is it possible to re-use Android system Icons, or do I have to draw my own?
Yes it is possible. Check out this page: http://androiddrawableexplorer.appspot.com/ for a list of all the usable icons. There is a usage example at the top, but if you are doing this in a menu.xml file, use some code that looks like this
<item android:id="@+id/end"
android:title="@string/end_label"
android:alphabeticShortcut="@string/end_shortcut"
android:icon = "@android:drawable/ic_menu_close_clear_cancel" />
FrinkTheBrave,
You can access many of the system drawables through android.R.drawable.<drawable here>
programmatically or android:icon=@android:drawable/<drawable here>
in XML. This site contains a full list of drawables, but some of them are private and therefor unusable by the user. If you are using Eclipse, intellisense should pull up a list of available drawables when you type android.R.drawable
.
精彩评论