Tooltip

open class Tooltip @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.sd_tooltipStyle, defStyleRes: Int = R.style.Sdds_Components_Tooltip) : Popover

Простое всплывающее окно с текстом и иконкой.

Author

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

Parameters

context

контекст

attrs

аттрибуты view

defStyleAttr

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

defStyleRes

стиль по умолчанию

Constructors

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

Properties

Link copied to clipboard
open override var colorState: ColorState?

Состояние цвета ColorState

Link copied to clipboard

Drawable в начале Tooltip

Link copied to clipboard
open var text: CharSequence?

Текст

Functions

Link copied to clipboard

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

Link copied to clipboard

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

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

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

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

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

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

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

Link copied to clipboard
fun setTextGravity(gravity: Int)

Устанавливает выравнивание текста

Link copied to clipboard
open override fun showWithTrigger(trigger: View, placement: Int, placementMode: Int, alignment: Int, tailEnabled: Boolean, triggerCentered: Boolean, duration: Long?)

Отображает Popover рядом с trigger, учитывая placement и alignment