TextDrawable

open class TextDrawable(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.sd_textDrawableStyle, defStyleRes: Int = R.style.Sdds_Components_TextDrawable) : ShapeDrawable

Drawable базовый рисующий компонент.

Parameters

context

контекст

attrs

аттрибуты

defStyleAttr

аттрибут стиля по умолчанию

Inheritors

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.sd_textDrawableStyle, defStyleRes: Int = R.style.Sdds_Components_TextDrawable)

Types

Link copied to clipboard
interface Delegate

Делегат для родителя, которая рисует TextDrawable

Link copied to clipboard

Выравнивание текста

Properties

Link copied to clipboard

Drawable в конце компонента

Link copied to clipboard

Drawable в начале компонента

Link copied to clipboard

Обрезка текста

Link copied to clipboard
open var text: CharSequence

Текст

Link copied to clipboard

Выравнивание текста

Functions

Link copied to clipboard
open override fun draw(canvas: Canvas)
Link copied to clipboard
open override fun getIntrinsicHeight(): Int
Link copied to clipboard
open override fun getIntrinsicWidth(): Int
Link copied to clipboard
open override fun isStateful(): Boolean
Link copied to clipboard

Устанавливает Delegate для TextDrawable

Link copied to clipboard
fun setDrawableEndRes(context: Context, @DrawableRes drawableRes: Int)

Устанавливает Drawable в конце по идентификатору ресурса

Link copied to clipboard

Устанавливает цвета Drawable в конце

Link copied to clipboard
fun setDrawableStartRes(context: Context, @DrawableRes drawableRes: Int)

Устанавливает Drawable в начале по идентификатору ресурса

Link copied to clipboard

Устанавливает цвета Drawable в начале

Link copied to clipboard
fun setPaddings(paddingLeft: Int = _paddingLeft, paddingTop: Int = _paddingTop, paddingRight: Int = _paddingRight, paddingBottom: Int = _paddingBottom)

Устанавливает внутренние отступы

Link copied to clipboard
fun setPaddingsRelative(paddingStart: Int = 0, paddingTop: Int = 0, paddingEnd: Int = 0, paddingBottom: Int = 0)

Устанавливает внутренние отступы

Link copied to clipboard
open fun setTextAppearance(context: Context, @StyleRes appearanceId: Int)

Устанавливает стиль текста по идентификатору стиля

Link copied to clipboard
open fun setTextColor(colors: ColorStateList?)

Устанавливает цвета текста