Label
data class Label(val text: String, @ColorInt val textColor: Int = Color.BLACK, @FloatRange(from = 0.0, fromInclusive = false) @Dimension(unit = 0) val textSize: Double = DEFAULT_TEXT_SIZE, val fontUri: Uri = DEFAULT_FONT_URI, val textAnchoring: TextAnchoring = DEFAULT_TEXT_ANCHORING, val offset: PointF = DEFAULT_OFFSET, @ColorInt val outlineColor: Int = Color.BLACK, @FloatRange(from = 0.0) val outlineWidth: Double = DEFAULT_OUTLINE_WIDTH)
Represents Marker label, including all the label specific attributes.
Parameters
text
Text of the Label.
textColor
Text color of the Label. The alpha will be ignored and set to fully opaque.
textSize
Text size (in dp units) of the Label.
fontUri
Uri of the font that will be used for the text rendering.
textAnchoring
TextAnchoring determining how the label is positioned in the Marker.
outlineColor
Outline color for the text. The alpha will be ignored and set to fully opaque.
outlineWidth
Width of the text outline.
Constructors
Link copied to clipboard
fun Label(text: String, @ColorInt textColor: Int = Color.BLACK, @FloatRange(from = 0.0, fromInclusive = false) @Dimension(unit = 0) textSize: Double = DEFAULT_TEXT_SIZE, fontUri: Uri = DEFAULT_FONT_URI, textAnchoring: TextAnchoring = DEFAULT_TEXT_ANCHORING, offset: PointF = DEFAULT_OFFSET, @ColorInt outlineColor: Int = Color.BLACK, @FloatRange(from = 0.0) outlineWidth: Double = DEFAULT_OUTLINE_WIDTH)