FloatingAppBarScrollBehavior


A FloatingAppBarScrollBehavior defines how a floating app bar should behave when the content under it is scrolled.

Summary

Public functions

Modifier

A Modifier that is attached to this behavior.

Cmn

Public properties

FloatingAppBarExitDirection

Indicates the direction towards which the floating app bar exits the screen.

Cmn
DecayAnimationSpec<Float>

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

Cmn
AnimationSpec<Float>

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

Cmn
FloatingAppBarState

A FloatingAppBarState 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 exitDirectionFloatingAppBarExitDirection

Indicates the direction towards which the floating app bar exits the screen.

flingAnimationSpec

val flingAnimationSpecDecayAnimationSpec<Float>

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

snapAnimationSpec

val snapAnimationSpecAnimationSpec<Float>

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

state

val stateFloatingAppBarState

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