ConstraintLayoutBaseScope

abstract class ConstraintLayoutBaseScope
kotlin.Any
   ↳ androidx.constraintlayout.compose.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
<ERROR CLASS>
applyTo(state: State)

<ERROR CLASS>

Specifies additional constraints associated to the horizontal chain identified with ref.

<ERROR CLASS>
constrain(ref: VerticalChainReference, constrainBlock: VerticalChainScope.() -> Unit)

Specifies additional constraints associated to the vertical chain identified with ref.

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.

HorizontalChainReference
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.

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

Creates a vertical chain including the referenced layouts.

open Unit

Properties
<ERROR CLASS>

Public constructors

ConstraintLayoutBaseScope

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): <ERROR CLASS>

constrain

fun constrain(
    ref: HorizontalChainReference,
    constrainBlock: HorizontalChainScope.() -> Unit
): <ERROR CLASS>

Specifies additional constraints associated to the horizontal chain identified with ref.

constrain

fun constrain(
    ref: VerticalChainReference,
    constrainBlock: VerticalChainScope.() -> Unit
): <ERROR CLASS>

Specifies additional constraints associated to the vertical chain identified with ref.

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
): HorizontalChainReference

Creates a horizontal chain including the referenced layouts.

Use constrain with the resulting HorizontalChainReference to modify the start/left and end/right constraints of this chain.

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
): VerticalChainReference

Creates a vertical chain including the referenced layouts.

Use constrain with the resulting VerticalChainReference to modify the top and bottom constraints of this chain.

reset

open fun reset(): Unit

Properties

tasks

protected val tasks: <ERROR CLASS>