I use a customized info window so that I can achieve a gray background and white text color. Yet, I get a white frame around it. I want all of the Info Window to be gray, that is including its triangular edge that points to the spot.
I use this code in my Activity
:
map.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
@Override // Use default InfoWindow frame
public View getInfoWindow(Marker marker) { return null; }
@Override // Defines the contents of the InfoWindow
public View getInfoContents(Marker marker) {
View v = getLayoutInflater().inflate(R.layout.map_info_window, null);
TextView tv_location = (TextView) v.findViewById(R.id.tv_location);
tv_location.setText(marker.getTitle());
return v;
}});
and this is my layout:
<!--?xml version="1.0" encoding="utf-8"?-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map_info_window"
android:layout_width="match_parent"
android:background="@color/light_grey"
android:orientation="horizontal"
android:layout_height="match_parent" >
<TextView
android:id="@+id/tv_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white" />
</LinearLayout>