Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Default icon for current user location?

how do I get the default icon for the current user location to display it on the map? In the maps applications, it's a blue array... I'd like to have something like that, but I don't find it it android.R.drawable... How do I get this default user location icon?

Thanks a lot!

like image 802
swalkner Avatar asked Mar 13 '11 12:03

swalkner


1 Answers

Here you can find the icons from Android 2.2, the current location icon is named ic_maps_indicator_current_position

Java Usage example: myMenuItem.setIcon(android.R.drawable.ic_menu_save);
Resource Usage example: android:icon="@android:drawable/ic_menu_save"

Note from the link above:

Some of the images in the Android jar are not public and therefore cannot be directly used (you can copy them to you own application, but can't reference them via the "android" package namespace). This project does not distinguish between what is public and what is not. If you try to use an image that is not public, you will get an error indicating that fact.

like image 84
marcosbeirigo Avatar answered Oct 11 '22 07:10

marcosbeirigo