Google is committed to advancing racial equity for Black communities. See how.

ConstraintLayoutBaseScope

abstract class ConstraintLayoutBaseScope
kotlin.Any
   ↳ androidx.compose.foundation.layout.ConstraintLayoutBaseScope

Common scope for ConstraintLayoutScope and ConstraintSetScope, the content being shared between the inline DSL API and the ConstraintSet-based API.

Summary

Nested classes
data

Represents a horizontal anchor corresponding to the FirstBaseline of a layout that other layouts can link to in their Modifier.constrainAs or constrain blocks.

data

Represents a horizontal anchor (e.

data

Represents a vertical anchor (e.

Public constructors

Common scope for ConstraintLayoutScope and ConstraintSetScope, the content being shared between the inline DSL API and the ConstraintSet-based API.

Public methods
Unit
applyTo(state: State)

ConstraintLayoutBaseScope.VerticalAnchor
createAbsoluteLeftBarrier(vararg elements: ConstrainedLayoutReference, margin: Dp = 0.dp)

Creates and returns a left barrier, containing the specified elements.

ConstraintLayoutBaseScope.VerticalAnchor
createAbsoluteRightBarrier(vararg elements: ConstrainedLayoutReference, margin: Dp = 0.dp)

Creates and returns a right barrier, containing the specified elements.

ConstraintLayoutBaseScope.HorizontalAnchor
createBottomBarrier(vararg elements: ConstrainedLayoutReference, margin: Dp = 0.dp)

Creates and returns a bottom barrier, containing the specified elements.

ConstraintLayoutBaseScope.VerticalAnchor
createEndBarrier(vararg elements: ConstrainedLayoutReference, margin: Dp = 0.dp)

Creates and returns an end barrier, containing the specified elements.

ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the left of the ConstraintLayout.

ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a width fraction from the left of the ConstraintLayout.

ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the right of the ConstraintLayout.

ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a width fraction from the right of the ConstraintLayout.

ConstraintLayoutBaseScope.HorizontalAnchor

Creates a guideline at a specific offset from the bottom of the ConstraintLayout.

ConstraintLayoutBaseScope.HorizontalAnchor

Creates a guideline at a height percenide from the bottom of the ConstraintLayout.

ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the end of the ConstraintLayout.

ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a width fraction from the end of the ConstraintLayout.

ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the start of the ConstraintLayout.

ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the start of the ConstraintLayout.

ConstraintLayoutBaseScope.HorizontalAnchor

Creates a guideline at a specific offset from the top of the ConstraintLayout.

ConstraintLayoutBaseScope.HorizontalAnchor

Creates a guideline at a height percenide from the top of the ConstraintLayout.

Unit
createHorizontalChain(vararg elements: ConstrainedLayoutReference, chainStyle: ChainStyle = ChainStyle.Spread)

Creates a horizontal chain including the referenced layouts.

ConstraintLayoutBaseScope.VerticalAnchor
createStartBarrier(vararg elements: ConstrainedLayoutReference, margin: Dp = 0.dp)

Creates and returns a start barrier, containing the specified elements.

ConstraintLayoutBaseScope.HorizontalAnchor
createTopBarrier(vararg elements: ConstrainedLayoutReference, margin: Dp = 0.dp)

Creates and returns a top barrier, containing the specified elements.

Unit
createVerticalChain(vararg elements: ConstrainedLayoutReference, chainStyle: ChainStyle = ChainStyle.Spread)

Creates a vertical chain including the referenced layouts.

Unit

Properties
MutableList<(State) -> Unit>

Public constructors

<init>

ConstraintLayoutBaseScope()

Common scope for ConstraintLayoutScope and ConstraintSetScope, the content being shared between the inline DSL API and the ConstraintSet-based API.

Public methods

applyTo

fun applyTo(state: State): Unit

createAbsoluteLeftBarrier

fun createAbsoluteLeftBarrier(
    vararg elements: ConstrainedLayoutReference,
    margin: Dp = 0.dp
): ConstraintLayoutBaseScope.VerticalAnchor

Creates and returns a left barrier, containing the specified elements.

createAbsoluteRightBarrier

fun createAbsoluteRightBarrier(
    vararg elements: ConstrainedLayoutReference,
    margin: Dp = 0.dp
): ConstraintLayoutBaseScope.VerticalAnchor

Creates and returns a right barrier, containing the specified elements.

createBottomBarrier

fun createBottomBarrier(
    vararg elements: ConstrainedLayoutReference,
    margin: Dp = 0.dp
): ConstraintLayoutBaseScope.HorizontalAnchor

Creates and returns a bottom barrier, containing the specified elements.

createEndBarrier

fun createEndBarrier(
    vararg elements: ConstrainedLayoutReference,
    margin: Dp = 0.dp
): ConstraintLayoutBaseScope.VerticalAnchor

Creates and returns an end barrier, containing the specified elements.

createGuidelineFromAbsoluteLeft

fun createGuidelineFromAbsoluteLeft(offset: Dp): ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the left of the ConstraintLayout.

createGuidelineFromAbsoluteLeft

fun createGuidelineFromAbsoluteLeft(fraction: Float): ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a width fraction from the left of the ConstraintLayout. A fraction of 0f will correspond to the left of the ConstraintLayout, while 1f will correspond to the right.

createGuidelineFromAbsoluteRight

fun createGuidelineFromAbsoluteRight(offset: Dp): ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the right of the ConstraintLayout.

createGuidelineFromAbsoluteRight

fun createGuidelineFromAbsoluteRight(fraction: Float): ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a width fraction from the right of the ConstraintLayout. A fraction of 0f will correspond to the right of the ConstraintLayout, while 1f will correspond to the left.

createGuidelineFromBottom

fun createGuidelineFromBottom(offset: Dp): ConstraintLayoutBaseScope.HorizontalAnchor

Creates a guideline at a specific offset from the bottom of the ConstraintLayout.

createGuidelineFromBottom

fun createGuidelineFromBottom(fraction: Float): ConstraintLayoutBaseScope.HorizontalAnchor

Creates a guideline at a height percenide from the bottom of the ConstraintLayout. A fraction of 0f will correspond to the bottom of the ConstraintLayout, while 1f will correspond to the top.

createGuidelineFromEnd

fun createGuidelineFromEnd(offset: Dp): ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the end of the ConstraintLayout.

createGuidelineFromEnd

fun createGuidelineFromEnd(fraction: Float): ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a width fraction from the end of the ConstraintLayout. A fraction of 0f will correspond to the end of the ConstraintLayout, while 1f will correspond to the start.

createGuidelineFromStart

fun createGuidelineFromStart(offset: Dp): ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the start of the ConstraintLayout.

createGuidelineFromStart

fun createGuidelineFromStart(fraction: Float): ConstraintLayoutBaseScope.VerticalAnchor

Creates a guideline at a specific offset from the start of the ConstraintLayout. A fraction of 0f will correspond to the start of the ConstraintLayout, while 1f will correspond to the end.

createGuidelineFromTop

fun createGuidelineFromTop(offset: Dp): ConstraintLayoutBaseScope.HorizontalAnchor

Creates a guideline at a specific offset from the top of the ConstraintLayout.

createGuidelineFromTop

fun createGuidelineFromTop(fraction: Float): ConstraintLayoutBaseScope.HorizontalAnchor

Creates a guideline at a height percenide from the top of the ConstraintLayout. A fraction of 0f will correspond to the top of the ConstraintLayout, while 1f will correspond to the bottom.

createHorizontalChain

fun createHorizontalChain(
    vararg elements: ConstrainedLayoutReference,
    chainStyle: ChainStyle = ChainStyle.Spread
): Unit

Creates a horizontal chain including the referenced layouts.

createStartBarrier

fun createStartBarrier(
    vararg elements: ConstrainedLayoutReference,
    margin: Dp = 0.dp
): ConstraintLayoutBaseScope.VerticalAnchor

Creates and returns a start barrier, containing the specified elements.

createTopBarrier

fun createTopBarrier(
    vararg elements: ConstrainedLayoutReference,
    margin: Dp = 0.dp
): ConstraintLayoutBaseScope.HorizontalAnchor

Creates and returns a top barrier, containing the specified elements.

createVerticalChain

fun createVerticalChain(
    vararg elements: ConstrainedLayoutReference,
    chainStyle: ChainStyle = ChainStyle.Spread
): Unit

Creates a vertical chain including the referenced layouts.

reset

fun reset(): Unit

Properties

tasks

protected val tasks: MutableList<(State) -> Unit>