Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class CustomGoogleMapInfoWindow : Java.Lang.Object, GoogleMap.IInfoWindowAdapter
private Activity m_context;
private View m_View;
private Marker m_currentMarker;
public CustomGoogleMapInfoWindow(Activity context)
m_context = context;
m_View = m_context.LayoutInflater.Inflate(Resource.Layout.CustomGoogleMapInfoWindow, null);
public View GetInfoWindow(Marker marker)
//Use the default info window
return null;
public View GetInfoContents(Marker marker)
if (marker == null)
return null;
m_currentMarker = marker;
ImageView imageview = m_View.FindViewById<ImageView>(Resource.Id.CustomGoogleMapInfoWindow_imageview);
TextView textviewTitle = m_View.FindViewById<TextView>(Resource.Id.CustomGoogleMapInfoWindow_textview_title);
TextView textviewDescription = m_View.FindViewById<TextView>(Resource.Id.CustomGoogleMapInfoWindow_textview_description);
RatingBar ratingBar = m_View.FindViewById<RatingBar>(Resource.Id.CustomGoogleMapInfoWindow_ratingbar);
if (marker.Title != null && marker.Title.Contains("Grenoble"))
textviewTitle.Text = marker.Title;
textviewDescription.Text = marker.Snippet;
ratingBar.Rating = 5;
return m_View;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.