Change or completely remove the highlight color of an InfoWindow of the Google Maps v2 on Android
Asked Answered
H

1

8

Is there any possibility to change the highlight color of an InfoWindow in the Google Maps v2 component for Android? I already accepted the fact that there is no common way to apply custom press highlights for the widgets that reside in a custom InfoWindow View passed through a custom InfoWindowAdapter as the View is rerendered as Bitmap by the map control (https://developers.google.com/maps/documentation/android/marker#info_windows see Note). On the same website there is a hint at the very bottom (https://developers.google.com/maps/documentation/android/marker#info_window_click_events) that says

When a user clicks on an info window, onInfoWindowClick(Marker) will be called and the info window will be highlighted in the default highlight color (Holo Blue for devices running Ice Cream Sandwich and newer, orange for earlier versions of Android).

So I tried to override the following theme values for my application

<item name="android:colorForeground">@color/black</item>
<item name="android:colorForegroundInverse">@color/white</item>
<item name="android:colorBackground">@color/white</item>
<item name="android:cacheColorHint">@color/white</item>

<item name="android:colorPressedHighlight">@color/white</item>
<item name="android:colorLongPressedHighlight">@color/white</item>
<item name="android:colorFocusedHighlight">@color/white</item>
<item name="android:colorMultiSelectHighlight">@color/white</item>
<item name="android:colorActivatedHighlight">@color/white</item>

That should override all default highlight colors with white. Unfortunately it takes no effect at all :/

My assumption is now that the default highlight colors are hardcoded by Google Maps and thus don´t get retrieved from the values of the applied application theme. That means there would be no way to change the highlight color. I hope I´m wrong though.

Any ideas?

Headon answered 15/3, 2013 at 11:47 Comment(0)
S
0

I think this is not possible yet, there is an acknowledged issue in gmaps-api-issues:

https://code.google.com/p/gmaps-api-issues/issues/detail?id=4783

Swill answered 25/8, 2013 at 19:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.