Stay organized with collections Save and categorize content based on your preferences.

ConstraintLayoutScope

class ConstraintLayoutScope : ConstraintLayoutBaseScope
kotlin.Any
   ↳ androidx.constraintlayout.compose.ConstraintLayoutBaseScope
   ↳ androidx.constraintlayout.compose.ConstraintLayoutScope

Scope used by the inline DSL of ConstraintLayout.

Summary

Nested classes
inner

Convenience API for creating multiple ConstrainedLayoutReference via createRefs.

Public methods
Modifier
Modifier.constrainAs(ref: ConstrainedLayoutReference, constrainBlock: ConstrainScope.() -> Unit)

Modifier that defines the constraints, as part of a ConstraintLayout, of the layout element.

<ERROR CLASS>

Creates one ConstrainedLayoutReference, which needs to be assigned to a layout within the ConstraintLayout as part of Modifier.constrainAs.

<ERROR CLASS>

Convenient way to create multiple ConstrainedLayoutReferences, which need to be assigned to layouts within the ConstraintLayout as part of Modifier.constrainAs.

Unit

Inherited functions
Inherited properties

Public methods

constrainAs

@Stable fun Modifier.constrainAs(
    ref: ConstrainedLayoutReference,
    constrainBlock: ConstrainScope.() -> Unit
): Modifier

Modifier that defines the constraints, as part of a ConstraintLayout, of the layout element.

createRef

fun createRef(): <ERROR CLASS>

Creates one ConstrainedLayoutReference, which needs to be assigned to a layout within the ConstraintLayout as part of Modifier.constrainAs. To create more references at the same time, see createRefs.

createRefs

@Stable fun createRefs(): <ERROR CLASS>

Convenient way to create multiple ConstrainedLayoutReferences, which need to be assigned to layouts within the ConstraintLayout as part of Modifier.constrainAs. To create just one reference, see createRef.

reset

fun reset(): Unit