Join us for ⁠#Android11: The Beta Launch Show on June 3!

ConstrainedLayoutReference

inner class ConstrainedLayoutReference
kotlin.Any
   ↳ androidx.ui.layout.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

ConstraintSetBuilderScope.Dimension

The height of the ConstraintLayout child.

Float

The horizontal bias of the current layout reference.

ConstraintSetBuilderScope.VerticalAnchor.ConstrainedLayoutAnchor

ConstraintSetBuilderScope.VerticalAnchor.ConstrainedLayoutAnchor

Any

ConstraintSetBuilderScope.HorizontalAnchor.ConstrainedLayoutAnchor

Float

The vertical bias of the current layout reference.

ConstraintSetBuilderScope.Dimension

The width of the ConstraintLayout child.

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

height

var height: ConstraintSetBuilderScope.Dimension

The height of the ConstraintLayout child.

horizontalBias

var horizontalBias: Float

The horizontal bias of the current layout reference.

tag

val tag: Any

verticalBias

var verticalBias: Float

The vertical bias of the current layout reference.

width

var width: ConstraintSetBuilderScope.Dimension

The width of the ConstraintLayout child.