Google Maps Utils IconGenerator text styles and background

I'm still not completely sure how to use setBackground() because I tried using Drawables but it wouldn't work but I figured out how to use setTextAppearance().

I just made a new style:

<style name="iconGenText">
    <item name="android:textSize">14sp</item>
    <item name="android:textColor">#000000</item>
</style>

And then applied it to IconGenerator:

IconGenerator icnGenerator = new IconGenerator(this);
icnGenerator.setTextAppearance(R.style.iconGenText);

It works as it should.


Set the background like this:

IconGenerator icnGenerator = new IconGenerator(this);
icnGenerator.setBackground(getResources().getDrawable(R.drawable.marker_background));

marker_background has to be a .9.png file. Like the drawables of the library.

It works pretty good for me.