googlemaps / android-maps-utils

Maps SDK for Android Utility Library
https://developers.google.com/maps/documentation/android-sdk/utility
Apache License 2.0
3.54k stars 1.53k forks source link

Setting Color for Text and for Background without using the given styles #114

Closed KingAlex1985 closed 9 years ago

KingAlex1985 commented 9 years ago

Is it possible to set the backgroundcolor and the textcolor manually without using the styles when using the "IconGenerator"? I see only a few styles (STYLE_GREEN, _ORANGE, _RED, _BLUE, _WHITE, _PURPLE, _DEFAULT) but I also need YELLOW, GREY, DARK_BLUE, LIGHT_BLUE and so on. So it would be great to have something like "setBackgroundcolor(int color)" and "setTextColor(int color)". What do you think? Is it a good improvement proposal? Thank you in advance. Greetings Alex K.

broady commented 9 years ago

great idea, but I don't think it's possible to generate 9 patches on the fly. Let me know if you find a way to do that.

KingAlex1985 commented 9 years ago

Hey Chris, honestly i dont know how to generate "9patch-PNGs" on the fly either. But what about adding some more styles directly in the code / library? Here my proposals: 1. Black-Background, 2. Yellow-Background, 3. GREY-Background, 4. BROWN-Background, 5. PINK-Background. What do you think? When you generate the 9patch-PNG, how do you do this? Do you first draw the Icon as a vector graphic file (SVG) and then transform it to PNG? Thank you in advance. Greetings from Germany Alex K.

broady commented 9 years ago

I'm completely wrong: http://developer.android.com/reference/android/graphics/NinePatch.html

KingAlex1985 commented 9 years ago

Hey Chris, thank you very much. I will try this out in a few hours. Greetings Alex K.

broady commented 9 years ago

i'm tagging 0.3.2 right now - it'll be available on maven within the next day