FloatingToolbarScrollBehavior


A FloatingToolbarScrollBehavior defines how a floating toolbar should behave when the content under it is scrolled.

Summary

Public functions

Modifier

A Modifier that is attached to this behavior.

Cmn

Public properties

FloatingToolbarExitDirection

Indicates the direction towards which the floating toolbar exits the screen.

Cmn
DecayAnimationSpec<Float>

An DecayAnimationSpec that defines how to fling the floating toolbar when the user flings the toolbar itself, or the content below it.

Cmn
AnimationSpec<Float>

An AnimationSpec that defines how the floating toolbar snaps to either fully collapsed or fully extended state when a fling or a drag scrolled it into an intermediate position.

Cmn
FloatingToolbarState

A FloatingToolbarState that is attached to this behavior and is read and updated when scrolling happens.

Cmn

Inherited functions

From androidx.compose.ui.input.nestedscroll.NestedScrollConnection
open suspend Velocity
onPostFling(consumed: Velocity, available: Velocity)

Post fling event chain.

Cmn
open Offset
onPostScroll(
    consumed: Offset,
    available: Offset,
    source: NestedScrollSource
)

Post scroll event pass.

Cmn
open suspend Velocity
onPreFling(available: Velocity)

Pre fling event chain.

Cmn
open Offset
onPreScroll(available: Offset, source: NestedScrollSource)

Pre scroll event chain.

Cmn

Public functions

floatingScrollBehavior

fun Modifier.floatingScrollBehavior(): Modifier

A Modifier that is attached to this behavior.

Public properties

exitDirection

val exitDirectionFloatingToolbarExitDirection

Indicates the direction towards which the floating toolbar exits the screen.

flingAnimationSpec

val flingAnimationSpecDecayAnimationSpec<Float>

An DecayAnimationSpec that defines how to fling the floating toolbar when the user flings the toolbar itself, or the content below it.

snapAnimationSpec

val snapAnimationSpecAnimationSpec<Float>

An AnimationSpec that defines how the floating toolbar snaps to either fully collapsed or fully extended state when a fling or a drag scrolled it into an intermediate position.

state

val stateFloatingToolbarState

A FloatingToolbarState that is attached to this behavior and is read and updated when scrolling happens.