Switch

open class Switch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.sd_switchStyle, defStyleRes: Int = R.style.Sdds_Components_Switch) : CompoundButton, Shapeable

Компонент Switch (переключатель)

Author

Малышев Александр on 06.06.2024

Parameters

context

контекст

attrs

аттрибуты view

defStyleAttr

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

Constructors

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

Properties

Link copied to clipboard

Текст-описание

Link copied to clipboard
open override val shape: ShapeModel?

Форма объекта

Functions

Link copied to clipboard
open override fun getButtonDrawable(): Drawable?
Link copied to clipboard
open override fun getCompoundDrawablePadding(): Int
Link copied to clipboard
open override fun getCompoundPaddingRight(): Int
Link copied to clipboard
open override fun setButtonDrawable(drawable: Drawable?)
Link copied to clipboard
open override fun setButtonIcon(icon: Icon?)
Link copied to clipboard
open fun setDescriptionTextAppearance(descriptionAppearances: StyleStateList?)

Устанавливает список стилей StyleStateList для description, которые соотвествуют drawableState

open fun setDescriptionTextAppearance(@StyleRes textAppearanceId: Int)

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

Link copied to clipboard

Устанавливает цвет дополнительного текста

Link copied to clipboard

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

Link copied to clipboard

Устанавливает цвета дополнительного текста

Link copied to clipboard
open override fun setEnabled(enabled: Boolean)
Link copied to clipboard
open fun setSwitchBorderWidth(borderWidth: Float)

Устанавливает толщину бордера для getButtonDrawable.

Link copied to clipboard
open fun setSwitchColors(track: ColorStateList?, thumb: ColorStateList?, border: ColorStateList?)

Устанавливает цвета для getButtonDrawable.

Link copied to clipboard
open override fun setText(text: CharSequence?, type: TextView.BufferType?)
Link copied to clipboard
fun setTextAppearancesList(labelAppearances: StyleStateList?)

Устанавливает список стилей StyleStateList для основного текста, которые соотвествуют drawableState