Extend on
OnMarkerClickListener
in your class.
and override this function
public boolean onMarkerClick(Marker arg0) {
// TODO Auto-generated method stub
arg0.showInfoWindow();
return true;
}
you can customize the infowindow by using the function
mMap.setInfoWindowAdapter(new BalloonAdapter(getLayoutInflater()));
public class BalloonAdapter implements InfoWindowAdapter {
LayoutInflater inflater = null;
private TextView textViewTitle;
public BalloonAdapter(LayoutInflater inflater) {
this.inflater = inflater;
}
public View getInfoWindow(Marker marker) {
View v = inflater.inflate(R.layout.balloon, null);
if (marker != null) {
textViewTitle = (TextView) v.findViewById(R.id.textViewTitle);
textViewTitle.setText(marker.getTitle());
}
return (v);
}
public View getInfoContents(Marker marker) {
return (null);
}
}