The second Android 11 Developer Preview is now available, test it out and share your feedback.

ConstrainedLayoutReference

class ConstrainedLayoutReference
kotlin.Any
   ↳ androidx.ui.layout.constraintlayout.ConstraintSetBuilderScope.ConstrainedLayoutReference

Summary

Public methods

Unit

Centers the layout in its parent.

Unit

Centers the layout horizontally in its parent.

Unit

Centers the layout vertically in its parent.

infix Unit

Adds constraints between left and right corresponding anchors of two layout references.

infix Unit

Adds constraints between left, top, right and bottom corresponding anchors of two layout references.

infix Unit

Adds constraints between top and bottom corresponding anchors of two layout references.

Properties

ConstraintSetBuilderScope.ConstrainedLayoutBaselineAnchor

ConstraintSetBuilderScope.HorizontalAnchor.ConstrainedLayoutAnchor

Float

The horizontal bias of the current layout reference.

ConstraintSetBuilderScope.VerticalAnchor.ConstrainedLayoutAnchor

ConstraintSetBuilderScope.VerticalAnchor.ConstrainedLayoutAnchor

State

Any

ConstraintSetBuilderScope.HorizontalAnchor.ConstrainedLayoutAnchor

Float

The vertical bias of the current layout reference.

Public methods

center

fun center(): Unit

Centers the layout in its parent.

centerHorizontally

fun centerHorizontally(): Unit

Centers the layout horizontally in its parent.

centerVertically

fun centerVertically(): Unit

Centers the layout vertically in its parent.

constrainHorizontallyTo

infix fun constrainHorizontallyTo(other: ConstraintSetBuilderScope.ConstrainedLayoutReference): Unit

Adds constraints between left and right corresponding anchors of two layout references.

constrainTo

infix fun constrainTo(other: ConstraintSetBuilderScope.ConstrainedLayoutReference): Unit

Adds constraints between left, top, right and bottom corresponding anchors of two layout references.

constrainVerticallyTo

infix fun constrainVerticallyTo(other: ConstraintSetBuilderScope.ConstrainedLayoutReference): Unit

Adds constraints between top and bottom corresponding anchors of two layout references.

Properties

horizontalBias

var horizontalBias: Float

The horizontal bias of the current layout reference.

state

val state: State

tag

val tag: Any

verticalBias

var verticalBias: Float

The vertical bias of the current layout reference.