My blog has moved!

You should be automatically redirected in 6 seconds. If not, visit
http://kavachai.com
and update your bookmarks.

Thursday, July 30, 2009

Using Android standard icons in designer

Today I wanted to use standard search icon on one of the buttons. When I want to use custom icon I use Reference Chooser dialog. As a result I have such a reference in a property:
@drawable/search_icon
But Reference Chooser dialog does not provide a way to use standard icon (or I don't see it). Fortunately we can type reference directly to property value either in designer or plane xml. So to use standard drawables "@android:drawable/id" pattern can be used. For example, to set standard search icon I used this reference text:
@android:drawable/ic_menu_search

No comments:

Post a Comment