show

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.

show(view) {
it.center eq parent.center

// more constraints to avoid popup going outside parent if desired
}

Return

the same view provided

Parameters

view

to be shown

constraints

used to position view


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.

show(view, other) { popup, anchor ->
popup.top eq anchor.bottom + 2
popup.centerX eq anchor.center.x

// more constraints to avoid popup going outside parent if desired
}

Return

the same view provided

Parameters

view

to be shown

relativeTo

is the View the popup will be positioned relative to

constraints

used to position view