IconGenerator

open class IconGenerator

IconGenerator generates icons that contain text (or custom content) within an info window-like shape.

The icon Bitmaps generated by the factory should be used in conjunction with a .

This class is not thread safe.

Constructors

Link copied to clipboard
constructor(context: Context)
Creates a new IconGenerator with the default style.

Properties

Link copied to clipboard
val STYLE_BLUE: Int = 4
Link copied to clipboard
Link copied to clipboard
val STYLE_GREEN: Int = 5
Link copied to clipboard
val STYLE_ORANGE: Int = 7
Link copied to clipboard
val STYLE_PURPLE: Int = 6
Link copied to clipboard
val STYLE_RED: Int = 3
Link copied to clipboard
val STYLE_WHITE: Int = 2

Functions

Link copied to clipboard
open fun getAnchorU(): Float
Link copied to clipboard
open fun getAnchorV(): Float
Link copied to clipboard
open fun makeIcon(): Bitmap
Creates an icon with the current content and style.
open fun makeIcon(text: CharSequence): Bitmap
Sets the text content, then creates an icon with the current style.
Link copied to clipboard
open fun setBackground(background: Drawable)
Set the background to a given Drawable, or remove the background.
Link copied to clipboard
open fun setColor(color: Int)
Sets the background to the default, with a given color tint.
Link copied to clipboard
open fun setContentPadding(left: Int, top: Int, right: Int, bottom: Int)
Sets the padding of the content view.
Link copied to clipboard
open fun setContentRotation(degrees: Int)
Rotates the contents of the icon.
Link copied to clipboard
open fun setContentView(contentView: View)
Sets the child view for the icon.
Link copied to clipboard
open fun setRotation(degrees: Int)
Rotates the icon.
Link copied to clipboard
open fun setStyle(style: Int)
Sets the style of the icon.
Link copied to clipboard
open fun setTextAppearance(resid: Int)
open fun setTextAppearance(context: Context, resid: Int)
Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.