[MonoDevelop] Set marker for Overlay items

simoncanninginc simoncanninginc at gmail.com
Thu Nov 15 12:50:43 UTC 2012

I am using MonoDevelop for Android and am adding some new OverlayItems.
Currently the icon is a monkey.

Can I please have some help in changing this icon to another icon.

I see that the SetMarker method is used to do this action. The SetMarker
method takes an argument of "Drawable marker". How can I get a list of the
default icons, and then select one to be the icon of the Overlayitem.

I have found this code sample:

//Create new marker
Drawable icon = this.getResources().getDrawable(R.drawable.marker);

//Set the bounding for the drawable
0 - icon.getIntrinsicWidth() / 2, 0 - icon.getIntrinsicHeight(), 
icon.getIntrinsicWidth() / 2, 0);

//Set the new marker to the overlay
Can I please have some help on how to use it properly? By this, I mean,
where do I place this code and what "Using" statements do I need to use?


View this message in context: http://mono.1490590.n4.nabble.com/Set-marker-for-Overlay-items-tp4657395.html
Sent from the Mono - MonoDevelop IDE mailing list archive at Nabble.com.

More information about the Monodevelop-list mailing list