ExpandableState
class ExpandableState
State of the Expandable composables.
It's used to control the showing/hiding of extra information either directly or connecting it with something like a button.
Summary
Public companion functions |
|
|---|---|
Saver<ExpandableState, Boolean> |
@ComposableThe default |
Public properties |
|
|---|---|
Float |
While in the middle of the animation, this represents the progress from 0f (collapsed) to 1f (expanded), or the other way around. |
Boolean |
Represents the current state of the component, true means it's showing the extra information. |
Public companion functions
saver
@Composable
fun saver(
expandAnimationSpec: AnimationSpec<Float>,
collapseAnimationSpec: AnimationSpec<Float>
): Saver<ExpandableState, Boolean>
The default Saver implementation for ExpandableState.
Public properties
expandProgress
val expandProgress: Float
While in the middle of the animation, this represents the progress from 0f (collapsed) to 1f (expanded), or the other way around. If no animation is running, it's either 0f if the extra content is not showing, or 1f if the extra content is showing.
expanded
var expanded: Boolean
Represents the current state of the component, true means it's showing the extra information. If its in the middle of an animation, the value of this field takes into account only the target of that animation.
Modifying this value triggers a change to show/hide the extra information.