TextDrawable

class TextDrawable(context: Context, text: String, @ColorInt textColor: Int) : Drawable

A Drawable that draws the given text. The text will be placed in the center of the drawable's bounding rectangle.

Parameters

context

The display context.

text

The text to be drawn on the screen.

textColor

The color to draw the text.

Constructors

Link copied to clipboard
fun TextDrawable(context: Context, text: String, @ColorInt textColor: Int)

Functions

Link copied to clipboard
open override fun draw(canvas: Canvas)
Link copied to clipboard
open override fun getOpacity(): Int
Link copied to clipboard
open override fun setAlpha(alpha: Int)
Link copied to clipboard
open override fun setColorFilter(colorFilter: ColorFilter?)

Inherited functions

Link copied to clipboard
open fun applyTheme(p0: Resources.Theme)
Link copied to clipboard
open fun canApplyTheme(): Boolean
Link copied to clipboard
open fun clearColorFilter()
Link copied to clipboard
fun copyBounds(): Rect
fun copyBounds(p0: Rect)
Link copied to clipboard
open fun getAlpha(): Int
Link copied to clipboard
fun getBounds(): Rect
Link copied to clipboard
open fun getCallback(): Drawable.Callback?
Link copied to clipboard
open fun getChangingConfigurations(): Int
Link copied to clipboard
open fun getColorFilter(): ColorFilter?
Link copied to clipboard
open fun getConstantState(): Drawable.ConstantState?
Link copied to clipboard
open fun getCurrent(): Drawable
Link copied to clipboard
open fun getDirtyBounds(): Rect
Link copied to clipboard
open fun getHotspotBounds(p0: Rect)
Link copied to clipboard
open fun getIntrinsicHeight(): Int
Link copied to clipboard
open fun getIntrinsicWidth(): Int
Link copied to clipboard
open fun getLayoutDirection(): Int
Link copied to clipboard
fun getLevel(): Int
Link copied to clipboard
open fun getMinimumHeight(): Int
Link copied to clipboard
open fun getMinimumWidth(): Int
Link copied to clipboard
open fun getOpticalInsets(): Insets
Link copied to clipboard
open fun getOutline(p0: Outline)
Link copied to clipboard
open fun getPadding(p0: Rect): Boolean
Link copied to clipboard
open fun getState(): IntArray
Link copied to clipboard
open fun getTransparentRegion(): Region?
Link copied to clipboard
open fun hasFocusStateSpecified(): Boolean
Link copied to clipboard
open fun inflate(p0: Resources, p1: XmlPullParser, p2: AttributeSet)
open fun inflate(p0: Resources, p1: XmlPullParser, p2: AttributeSet, p3: Resources.Theme?)
Link copied to clipboard
open fun invalidateSelf()
Link copied to clipboard
open fun isAutoMirrored(): Boolean
Link copied to clipboard
open fun isFilterBitmap(): Boolean
Link copied to clipboard
open fun isProjected(): Boolean
Link copied to clipboard
open fun isStateful(): Boolean
Link copied to clipboard
fun isVisible(): Boolean
Link copied to clipboard
open fun jumpToCurrentState()
Link copied to clipboard
open fun mutate(): Drawable
Link copied to clipboard
open fun onBoundsChange(p0: Rect)
Link copied to clipboard
open fun onLayoutDirectionChanged(p0: Int): Boolean
Link copied to clipboard
open fun onLevelChange(p0: Int): Boolean
Link copied to clipboard
open fun onStateChange(p0: IntArray): Boolean
Link copied to clipboard
open fun scheduleSelf(p0: Runnable, p1: Long)
Link copied to clipboard
open fun setAutoMirrored(p0: Boolean)
Link copied to clipboard
open fun setBounds(p0: Rect)
open fun setBounds(p0: Int, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
fun setCallback(p0: Drawable.Callback?)
Link copied to clipboard
open fun setChangingConfigurations(p0: Int)
Link copied to clipboard
open fun setColorFilter(p0: Int, p1: PorterDuff.Mode)
Link copied to clipboard
open fun setDither(p0: Boolean)
Link copied to clipboard
open fun setFilterBitmap(p0: Boolean)
Link copied to clipboard
open fun setHotspot(p0: Float, p1: Float)
Link copied to clipboard
open fun setHotspotBounds(p0: Int, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
fun setLayoutDirection(p0: Int): Boolean
Link copied to clipboard
fun setLevel(p0: Int): Boolean
Link copied to clipboard
open fun setState(p0: IntArray): Boolean
Link copied to clipboard
open fun setTint(p0: Int)
Link copied to clipboard
open fun setTintBlendMode(p0: BlendMode?)
Link copied to clipboard
open fun setTintList(p0: ColorStateList?)
Link copied to clipboard
open fun setTintMode(p0: PorterDuff.Mode?)
Link copied to clipboard
open fun setVisible(p0: Boolean, p1: Boolean): Boolean
Link copied to clipboard
open fun unscheduleSelf(p0: Runnable)