@ExperimentalMotionApi
@LayoutScopeMarker
class KeyPositionScope : BaseKeyFrameScope


Scope to define KeyFrame positions.

These are modifications on the widget's position and size relative to its final state on the current transition.

Summary

Public properties

CurveFit?

Type of fit applied to the curve.

Float

The height as a percentage of the height at the end ConstraintSet.

Float

The width as a percentage of the width at the end ConstraintSet.

Float

The position as a percentage of the X axis of the current coordinate space.

Float

The position as a percentage of the Y axis of the current coordinate space.

Inherited functions

From androidx.constraintlayout.compose.BaseKeyFrameScope
ObservableProperty<E>
<E : NamedPropertyOrValue?> addNameOnPropertyChange(
    initialValue: E,
    nameOverride: String?
)

Property delegate that updates the keyFramePropertiesValue map on value changes.

ObservableProperty<T>
<T : Any?> addOnPropertyChange(initialValue: T, nameOverride: String?)

When changed, updates the value of type T on the keyFramePropertiesValue map.

Public properties

curveFit

Added in 1.1.0-rc01
var curveFitCurveFit?

Type of fit applied to the curve. CurveFit.Spline by default.

percentHeight

Added in 1.1.0-rc01
var percentHeightFloat

The height as a percentage of the height at the end ConstraintSet.

percentWidth

Added in 1.1.0-rc01
var percentWidthFloat

The width as a percentage of the width at the end ConstraintSet.

percentX

Added in 1.1.0-rc01
var percentXFloat

The position as a percentage of the X axis of the current coordinate space.

Where 0 is the position at the start ConstraintSet and 1 is at the end ConstraintSet.

The coordinate space is defined by KeyPositionsScope.type.

percentY

Added in 1.1.0-rc01
var percentYFloat

The position as a percentage of the Y axis of the current coordinate space.

Where 0 is the position at the start ConstraintSet and 1 is at the end ConstraintSet.

The coordinate space is defined by KeyPositionsScope.type.