Badge

open class Badge @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.sd_badgeStyle, defStyleRes: Int = R.style.Sdds_Components_Badge) : View, ColorStateHolder, TextDrawable.Delegate, Shapeable

Компонент Badge.

Parameters

context

контекст

attrs

аттрибуты view

defStyleAttr

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

Inheritors

Constructors

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

Properties

Link copied to clipboard
open override var colorState: ColorState?

Состояние внешнего вида компонента Badge

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
open override val shape: ShapeModel?
Link copied to clipboard
open var text: CharSequence?

Текст

Functions

Link copied to clipboard
open override fun onDrawableSizeChange()

Колбэк изменения размера TextDrawable

Link copied to clipboard

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

Link copied to clipboard

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

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

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

Link copied to clipboard

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

Link copied to clipboard

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

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

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

Link copied to clipboard
open override fun setPadding(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open override fun setPaddingRelative(start: Int, top: Int, end: Int, bottom: Int)
Link copied to clipboard
open fun setTextAppearance(@StyleRes appearanceId: Int)

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

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

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