Companion

object Companion

Functions

Link copied to clipboard
fun enterAlways(state: TopAppBarState = rememberTopAppBarState(), canScroll: () -> Boolean = { true }, snapAnimationSpec: AnimationSpec<Float>? = spring(stiffness = Spring.StiffnessMediumLow), flingAnimationSpec: DecayAnimationSpec<Float>? = rememberSplineBasedDecay()): TopAppBarScrollBehavior

Returns a TopAppBarScrollBehavior. A top app bar that is set up with this TopAppBarScrollBehavior will immediately collapse when the content is pulled up, and will immediately appear when the content is pulled down.

Link copied to clipboard
fun exitUntilCollapsed(state: TopAppBarState = rememberTopAppBarState(), canScroll: () -> Boolean = { true }, snapAnimationSpec: AnimationSpec<Float>? = spring(stiffness = Spring.StiffnessMediumLow), flingAnimationSpec: DecayAnimationSpec<Float>? = rememberSplineBasedDecay()): TopAppBarScrollBehavior

Returns a TopAppBarScrollBehavior that adjusts its properties to affect the colors and height of the top app bar.

Link copied to clipboard
fun pinned(state: TopAppBarState = rememberTopAppBarState(), canScroll: () -> Boolean = { true }): TopAppBarScrollBehavior

Returns a pinned TopAppBarScrollBehavior that tracks nested-scroll callbacks and updates its TopAppBarState.contentOffset accordingly.