TooltipCompat


class TooltipCompat


Helper class used to emulate the behavior of setTooltipText prior to API level 26.

Summary

Public functions

java-static Unit
setTooltipText(view: View, tooltipText: CharSequence?)

Sets the tooltip text for the view.

Public functions

setTooltipText

Added in 1.1.0
java-static fun setTooltipText(view: View, tooltipText: CharSequence?): Unit

Sets the tooltip text for the view.

On API 26 and later, this method calls through to setTooltipText.

Prior to API 26, this method sets or clears (when tooltipText is null) the view's OnLongClickListener and OnHoverListener. A tooltip-like sub-panel will be created on long-click or mouse hover.

Parameters
view: View

the view on which to set the tooltip text

tooltipText: CharSequence?

the tooltip text