PopupManager

interface PopupManager

Provides a robust way to display temporary top-level Views that can be anchored to others. This makes it easy to show things like drop-downs, modals, or tool tips.

Functions

Link copied to clipboard
abstract fun active(view: View): Boolean

Indicates whether view is currently being shown via show. Calling hide on a View will mean this method returns false for it.

Link copied to clipboard
abstract fun hide(view: View)

Hides view if it was previously displayed using show

Link copied to clipboard
abstract fun relayout(view: View)

Trigger re-layout of view if it is currently active.

Link copied to clipboard
abstract fun show(view: View, constraints: ConstraintDslContext.(Bounds) -> Unit): View

Shows view as though it is a pop-up, that means it is placed atop all other views in the app.

abstract fun show(view: View, relativeTo: View, constraints: ConstraintDslContext.(Bounds, Rectangle) -> Unit): View

Shows view as though it is a pop-up, that means it is placed atop all other views in the app. The given constraints include details about the bounds of relativeTo, which allows view to be positioned relative to it.