TextDrawableHelper

Class that helps to support drawing text in drawables. It can be used by any drawable that draws text.

Constructors

Link copied to clipboard
Please provide a delegate if your text font may load asynchronously.

Types

Link copied to clipboard
Delegate interface to be implemented by Drawables that own a TextDrawableHelper.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun getTextHeight(@Nullable text: String): Float
Returns the visual height of the text based on its current text appearance.
Link copied to clipboard
open fun getTextWidth(text: String): Float
Returns the visual width of the text based on its current text appearance.
Link copied to clipboard
Link copied to clipboard
Sets the delegate that owns this TextDrawableHelper.
Link copied to clipboard
open fun setTextAppearance(@Nullable textAppearance: TextAppearance, context: Context)
Sets the delegate drawable's text appearance.
Link copied to clipboard
open fun setTextSizeDirty(dirty: Boolean)
Link copied to clipboard
open fun setTextWidthDirty(dirty: Boolean)
Link copied to clipboard