{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

BasicTooltipState

@ExperimentalMaterial3Api
public interface BasicTooltipState

Known direct subclasses
TooltipState

The state that is associated with a TooltipBox.


The state that is associated with an instance of a tooltip. Each instance of tooltips should have its own BasicTooltipState.

Summary

Public methods

abstract void

Dismiss the tooltip associated with this BasicTooltipState if it's currently being shown.

abstract boolean

Boolean that determines if the tooltip associated with this will be persistent or not.

abstract boolean

Boolean that indicates if the tooltip is currently being shown or not.

abstract void

Clean up when the this state leaves Composition.

abstract void
show(@NonNull MutatePriority mutatePriority)

Show the tooltip associated with the current BasicTooltipState.

Public methods

dismiss

abstract void dismiss()

Dismiss the tooltip associated with this BasicTooltipState if it's currently being shown.

isPersistent

abstract boolean isPersistent()

Boolean that determines if the tooltip associated with this will be persistent or not. If isPersistent is true, then the tooltip will only be dismissed when the user clicks outside the bounds of the tooltip or if BasicTooltipState.dismiss is called. When isPersistent is false, the tooltip will dismiss after a short duration. Ideally, this should be set to true when there is actionable content being displayed within a tooltip.

isVisible

abstract boolean isVisible()

Boolean that indicates if the tooltip is currently being shown or not.

onDispose

abstract void onDispose()

Clean up when the this state leaves Composition.

show

abstract void show(@NonNull MutatePriority mutatePriority)

Show the tooltip associated with the current BasicTooltipState. When this method is called all of the other tooltips currently being shown will dismiss.

Parameters
@NonNull MutatePriority mutatePriority

MutatePriority to be used.