FontIconDrawable

A drawable that draws an icon using a icon font. This effectively just calls Canvas.drawFontIcon on the Drawable canvas.

Constructors

Link copied to clipboard
constructor(iconName: String, typeface: Typeface, fontFeatureSettings: String?, tint: Color, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp)

A drawable that draws the icon iconName using the typeface. The icon will be size × size dp, and will be tinted with tint.

constructor(icon: Char, typeface: Typeface, fontFeatureSettings: String?, tint: Color, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp)

A drawable that draws the icon using the typeface. The icon will be size × size dp, and will be tinted with tint.

constructor(iconName: String, iconFont: StaticIconFont, tint: Color, context: Context, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT))

A drawable that draws the icon iconName using the iconFont. The icon will be size × size dp, and will be tinted with tint.

constructor(icon: Char, iconFont: StaticIconFont, tint: Color, context: Context, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT))

A drawable that draws the icon using the iconFont. The icon will be size × size dp, and will be tinted with tint.

constructor(iconName: String, typeface: Typeface, fontFeatureSettings: String?, fontVariationSettings: FontVariation.Settings, tint: Color, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT))

A drawable that draws the icon iconName using the variable typeface. The icon will be size × size dp, and will be tinted with tint.

constructor(icon: Char, typeface: Typeface, fontFeatureSettings: String?, fontVariationSettings: FontVariation.Settings, tint: Color, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT))

A drawable that draws the icon using the variable typeface. The icon will be size × size dp, and will be tinted with tint.

constructor(iconName: String, iconFont: VariableIconFont, tint: Color, context: Context, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT))

A drawable that draws the icon iconName using the variable iconFont. The icon will be size × size dp, and will be tinted with tint.

constructor(icon: Char, iconFont: VariableIconFont, tint: Color, context: Context, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT))

A drawable that draws the icon using the variable iconFont. The icon will be size × size dp, and will be tinted with tint.

Properties

Link copied to clipboard
open var alpha: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val current: Drawable
Link copied to clipboard
open val dirtyBounds: Rect
Link copied to clipboard
open override val intrinsicHeight: Int
Link copied to clipboard
open override val intrinsicWidth: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var level: Int
Link copied to clipboard
open val minimumHeight: Int
Link copied to clipboard
open val minimumWidth: Int
Link copied to clipboard
open override val opacity: Int
Link copied to clipboard
Link copied to clipboard
open var state: IntArray
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun clearColorFilter()
Link copied to clipboard
fun copyBounds(bounds: Rect)
Link copied to clipboard
open fun getHotspotBounds(outRect: Rect)
Link copied to clipboard
open fun getOutline(outline: Outline)
Link copied to clipboard
open fun getPadding(padding: Rect): Boolean
Link copied to clipboard
Link copied to clipboard
open fun inflate(r: Resources, parser: XmlPullParser, attrs: AttributeSet)
open fun inflate(r: Resources, parser: XmlPullParser, attrs: AttributeSet, theme: Resources.Theme?)
Link copied to clipboard
open fun invalidateSelf()
Link copied to clipboard
Link copied to clipboard
open fun mutate(): Drawable
Link copied to clipboard
open fun onLayoutDirectionChanged(layoutDirection: Int): Boolean
Link copied to clipboard
open fun scheduleSelf(what: Runnable, when: Long)
Link copied to clipboard
open fun setColorFilter(color: Int, mode: PorterDuff.Mode)
Link copied to clipboard
open fun setDither(dither: Boolean)
Link copied to clipboard
open fun setHotspot(x: Float, y: Float)
Link copied to clipboard
open fun setHotspotBounds(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun setTint(tintColor: Int)
Link copied to clipboard
open fun setTintBlendMode(blendMode: BlendMode?)
Link copied to clipboard
open fun setTintList(tint: ColorStateList?)
Link copied to clipboard
open fun setTintMode(tintMode: PorterDuff.Mode?)
Link copied to clipboard
open fun setVisible(visible: Boolean, restart: Boolean): Boolean
Link copied to clipboard
open fun unscheduleSelf(what: Runnable)