androidx.constraintlayout.compose
Interfaces
BaselineAnchorable |
Represents the |
ConstraintLayoutTagParentData |
|
ConstraintSet |
Immutable description of the constraints used to layout the children of a |
DesignInfoProvider |
Interface used for Studio tooling. |
Dimension |
Represents a dimension that can be assigned to the width or height of a child |
Dimension.Coercible |
A |
Dimension.MaxCoercible |
A |
Dimension.MinCoercible |
A |
HorizontalAnchorable |
Represents a horizontal side of a layout (i.e top and bottom) that can be anchored using |
LayoutInformationReceiver |
|
MotionCarouselScope |
|
MotionItemsProvider |
|
MotionScene |
Information for MotionLayout to animate between multiple |
Transition |
Defines interpolation parameters between two |
VerticalAnchorable |
Represents a vertical side of a layout (i.e start and end) that can be anchored using |
Classes
Arc |
Determines a specific arc direction of the widget's path on a |
BaseKeyFrameScope |
The base/common scope for individual KeyFrame declarations. |
BaseKeyFramesScope |
The base/common scope for KeyFrames. |
ChainStyle |
The style of a horizontal or vertical chain. |
ConstrainScope |
Scope that can be used to constrain a layout. |
ConstrainedLayoutReference |
Represents a layout within a |
ConstraintLayoutBaseScope |
Common scope for |
ConstraintLayoutBaseScope.BaselineAnchor |
Represents a horizontal anchor corresponding to the |
ConstraintLayoutBaseScope.HorizontalAnchor |
Represents a horizontal anchor (e.g. top/bottom of a layout, guideline) that layouts can link to in their |
ConstraintLayoutBaseScope.VerticalAnchor |
Represents a vertical anchor (e.g. start/end of a layout, guideline) that layouts can link to in their |
ConstraintLayoutScope |
Scope used by the inline DSL of |
ConstraintLayoutScope.ConstrainedLayoutReferences |
Convenience API for creating multiple |
ConstraintSetRef |
|
ConstraintSetScope |
Scope used by the |
ConstraintSetScope.ConstrainedLayoutReferences |
|
CurveFit |
Type of fit applied between curves. |
DebugFlags |
Flags to use with MotionLayout to enable visual debugging. |
Easing |
Supported Easing curves. |
FlowStyle |
Defines how widgets are spaced in a chain |
GridFlag |
Set of individual options that may change the Grid helper behavior, each flag can be combined with the |
HorizontalAlign |
Defines how objects align horizontally in the chain |
HorizontalChainReference |
Represents a horizontal chain within a |
HorizontalChainScope |
|
InvalidationStrategy |
Provide different invalidation strategies for |
InvalidationStrategySpecification |
Helper scope that provides some strategies to improve performance based on incoming constraints. |
KeyAttributeScope |
Scope to define KeyFrame attributes. |
KeyAttributesScope |
Scope where multiple attribute KeyFrames may be defined. |
KeyCycleScope |
Scope to define cycling KeyFrames. |
KeyCyclesScope |
Scope where multiple cycling attribute KeyFrames may be defined. |
KeyPositionScope |
Scope to define KeyFrame positions. |
KeyPositionsScope |
Scope where multiple position KeyFrames may be defined. |
LayoutReference |
Represents a |
MotionLayoutScope |
|
MotionLayoutScope.CustomProperties |
|
MotionLayoutScope.MotionProperties |
|
MotionSceneScope |
Scope used by the MotionScene DSL. |
MotionSceneScope.ConstrainedLayoutReferences |
|
OnSwipe |
Defines the OnSwipe behavior for a |
RelativePosition |
Relative coordinate space in which KeyPositions are applied. |
Skip |
Defines how many rows and/or columns to skip, starting from the given position. |
Span |
Defines the spanned area (that crosses multiple columns and/or rows) that a widget will take when placed at the given position. |
SpringBoundary |
Behavior of the spring as it crosses its target position. |
State |
The state of the |
SwipeDirection |
Direction of the touch input that will initiate the swipe handling. |
SwipeMode |
Defines the type of motion used when animating during touch-up. |
SwipeSide |
Side of the bounds to track during touch handling, this is to account for when the widget changes size during the |
SwipeTouchUp |
The logic used to decide the target position when the touch input ends. |
TransitionScope |
Scope where |
VerticalAlign |
Defines how objects align vertically within the chain |
VerticalChainReference |
Represents a vertical chain within a |
VerticalChainScope |
|
Visibility |
The overall visibility of a widget in a |
Wrap |
Wrap defines the type of chain |
Objects
Annotations
Enums
LayoutInfoFlags |
|
MotionLayoutDebugFlags |
|
MotionLayoutFlag |
This enum is deprecated. Unnecessary, MotionLayout remeasures when its content changes. |
Composables
ConstraintLayout |
Layout that positions its children according to the constraints between them. |
ConstraintSet |
Parses |
ItemHolder |
|
MotionCarousel |
Implements an horizontal Carousel of n elements, driven by drag gestures and customizable through a provided MotionScene. |
MotionLayout |
Layout that can animate between multiple |
MotionScene |
Parses the given JSON5 into a |
Modifiers
layoutId |
Alternative to |
Top-level functions summary
ConstraintSet |
ConstraintSet(description: ConstraintSetScope.() -> Unit)Creates a |
ConstraintSet |
ConstraintSet(@Language(value = "json5") jsonContent: String)Parses the given JSON5 into a |
ConstraintSet |
ConstraintSet(extendConstraintSet: ConstraintSet, description: ConstraintSetScope.() -> Unit)Creates a |
ConstraintSet |
ConstraintSet(Creates a |
MotionScene |
@ExperimentalMotionApiReturns a |
Transition |
@ExperimentalMotionApiParses the given JSON5 into a |
Transition |
@ExperimentalMotionApiDefines the interpolation parameters between the |
Extension functions summary
Dimension.MaxCoercible |
Dimension.Coercible.atLeast(dp: Dp)Sets the lower bound of the current |
Dimension |
Sets the lower bound of the current |
Dimension |
This function is deprecated. Unintended method name, use atLeast(dp) instead |
Dimension.MinCoercible |
Dimension.Coercible.atMost(dp: Dp)Sets the upper bound of the current |
Dimension |
Sets the upper bound of the current |
inline Unit |
<T : Any?> MotionCarouselScope.items( |
inline Unit |
<T : Any?> MotionCarouselScope.itemsWithProperties( |
Top-level properties summary
Extension properties summary
Dimension.MaxCoercible |
Sets the lower bound of the current |
Dimension |
Sets the lower bound of the current |
Dimension.MinCoercible |
Sets the upper bound of the current |
Dimension |
Sets the upper bound of the current |
Any? |
|
Any? |
Top-level functions
ConstraintSet
fun ConstraintSet(description: ConstraintSetScope.() -> Unit): ConstraintSet
Creates a ConstraintSet with the constraints defined in the description block.
See ConstraintSet to learn how to define constraints.
ConstraintSet
fun ConstraintSet(@Language(value = "json5") jsonContent: String): ConstraintSet
Parses the given JSON5 into a ConstraintSet.
See the official GitHub Wiki to learn the syntax.
ConstraintSet
fun ConstraintSet(extendConstraintSet: ConstraintSet, description: ConstraintSetScope.() -> Unit): ConstraintSet
Creates a ConstraintSet that extends the changes applied by extendConstraintSet.
See ConstraintSet to learn how to define constraints.
ConstraintSet
fun ConstraintSet(
extendConstraintSet: ConstraintSet,
@Language(value = "json5") jsonContent: String
): ConstraintSet
Creates a ConstraintSet from a jsonContent string that extends the changes applied by extendConstraintSet.
MotionScene
@ExperimentalMotionApi
fun MotionScene(motionSceneContent: MotionSceneScope.() -> Unit): MotionScene
Returns a MotionScene instance defined by motionSceneContent.
Transition
@ExperimentalMotionApi
fun Transition(@Language(value = "json5") content: String): Transition
Parses the given JSON5 into a Transition.
See the official GitHub Wiki to learn the syntax.
Transition
@ExperimentalMotionApi
fun Transition(from: String = "start", to: String = "end", content: TransitionScope.() -> Unit): Transition
Defines the interpolation parameters between the ConstraintSets to achieve fine-tuned animations.
| Parameters | |
|---|---|
from: String = "start" |
The name of the initial |
to: String = "end" |
The name of the target |
content: TransitionScope.() -> Unit |
Lambda to define the Transition parameters on the given |
Extension functions
Dimension.Coercible.atLeast
fun Dimension.Coercible.atLeast(dp: Dp): Dimension.MaxCoercible
Sets the lower bound of the current Dimension to a fixed dp value.
Dimension.MinCoercible.atLeast
fun Dimension.MinCoercible.atLeast(dp: Dp): Dimension
Sets the lower bound of the current Dimension to a fixed dp value.
Dimension.MinCoercible.atLeastWrapContent
fun Dimension.MinCoercible.atLeastWrapContent(dp: Dp): Dimension
Sets the lower bound of the current Dimension to a fixed dp value.
Dimension.Coercible.atMost
fun Dimension.Coercible.atMost(dp: Dp): Dimension.MinCoercible
Sets the upper bound of the current Dimension to a fixed dp value.
Dimension.MaxCoercible.atMost
fun Dimension.MaxCoercible.atMost(dp: Dp): Dimension
Sets the upper bound of the current Dimension to a fixed dp value.
MotionCarouselScope.items
inline fun <T : Any?> MotionCarouselScope.items(
items: List<T>,
crossinline itemContent: @Composable (item) -> Unit
): Unit
MotionCarouselScope.itemsWithProperties
inline fun <T : Any?> MotionCarouselScope.itemsWithProperties(
items: List<T>,
crossinline itemContent: @Composable (item, properties: State<MotionLayoutScope.MotionProperties>) -> Unit
): Unit
Top-level properties
Extension properties
Dimension.Coercible.atLeastWrapContent
val Dimension.Coercible.atLeastWrapContent: Dimension.MaxCoercible
Sets the lower bound of the current Dimension to be the wrap content size of the child.
Dimension.MinCoercible.atLeastWrapContent
val Dimension.MinCoercible.atLeastWrapContent: Dimension
Sets the lower bound of the current Dimension to be the wrap content size of the child.
Dimension.Coercible.atMostWrapContent
val Dimension.Coercible.atMostWrapContent: Dimension.MinCoercible
Sets the upper bound of the current Dimension to be the wrap content size of the child.
Dimension.MaxCoercible.atMostWrapContent
val Dimension.MaxCoercible.atMostWrapContent: Dimension
Sets the upper bound of the current Dimension to be the WRAP_DIMENSION size of the child.