BottomDrawerState
Kotlin
|Java
class BottomDrawerState : SwipeableState<BottomDrawerValue>
kotlin.Any | ||
↳ | androidx.compose.material.SwipeableState<androidx.compose.material.BottomDrawerValue> | |
↳ | androidx.compose.material.BottomDrawerState |
State of the BottomDrawerLayout composable.
Summary
Public constructors | |
---|---|
<init>(initialValue: BottomDrawerValue, clock: AnimationClockObservable, confirmStateChange: (BottomDrawerValue) -> Boolean = { true }) State of the BottomDrawerLayout composable. |
Public methods | |
---|---|
Unit |
Close the drawer with an animation. |
Unit |
Expand the drawer with an animation. |
Unit |
Open the drawer with an animation. |
Companion functions | |
---|---|
Saver<BottomDrawerState, BottomDrawerValue> |
Saver(clock: AnimationClockObservable, confirmStateChange: (BottomDrawerValue) -> Boolean) The default Saver implementation for BottomDrawerState. |
Inherited functions | |
---|---|
Properties | |
---|---|
Boolean |
Whether the drawer is closed. |
Boolean |
Whether the drawer is expanded. |
Boolean |
Whether the drawer is open. |
Inherited properties | |
---|---|
Public constructors
<init>
BottomDrawerState(
initialValue: BottomDrawerValue,
clock: AnimationClockObservable,
confirmStateChange: (BottomDrawerValue) -> Boolean = { true })
State of the BottomDrawerLayout composable.
Parameters | |
---|---|
initialValue: BottomDrawerValue | The initial value of the state. |
clock: AnimationClockObservable | The animation clock that will be used to drive the animations. |
confirmStateChange: (BottomDrawerValue) -> Boolean = { true } | Optional callback invoked to confirm or veto a pending state change. |
Public methods
close
fun close(onClosed: () -> Unit = null): Unit
Close the drawer with an animation.
Parameters | |
---|---|
onClosed: () -> Unit = null | Optional callback invoked when the drawer has finished closing. |
expand
fun expand(onExpanded: () -> Unit = null): Unit
Expand the drawer with an animation.
Parameters | |
---|---|
onExpanded: () -> Unit = null | Optional callback invoked when the drawer has finished expanding. |
open
fun open(onOpened: () -> Unit = null): Unit
Open the drawer with an animation.
Parameters | |
---|---|
onOpened: () -> Unit = null | Optional callback invoked when the drawer has finished opening. |
Properties
Companion functions
Saver
fun Save