object BottomAppBarDefaults
Contains default values used for the bottom app bar implementations.
Properties
containerColor
val containerColor: Color
Default color used for BottomAppBar container
ContainerElevation
val ContainerElevation: Dp
Default elevation used for BottomAppBar
ContentPadding
val ContentPadding =
PaddingValues(
start = BottomAppBarHorizontalPadding,
top = BottomAppBarVerticalPadding,
end = BottomAppBarHorizontalPadding,
)
Default padding used for BottomAppBar when content are default size (24dp) icons in IconButton that meet the minimum touch target (48.dp).
windowInsets
val windowInsets: WindowInsets
Default insets that will be used and consumed by BottomAppBar.
bottomAppBarFabColor
val bottomAppBarFabColor: Color
The color of a BottomAppBar's FloatingActionButton
FlexibleContentPadding
val FlexibleContentPadding =
PaddingValues(
start = DockedToolbarTokens.ContainerLeadingSpace,
end = DockedToolbarTokens.ContainerTrailingSpace,
)
Default padding used for FlexibleBottomAppBar.
FlexibleBottomAppBarHeight
val FlexibleBottomAppBarHeight = DockedToolbarTokens.ContainerHeight
Default height of a flexible FlexibleBottomAppBar. The height here represents the height of the bottom app bar in its expanded state.
FlexibleHorizontalArrangement
val FlexibleHorizontalArrangement: Arrangement.Horizontal
A default Arrangement that will be used to space a FlexibleBottomAppBar's content.
FlexibleFixedHorizontalArrangement
val FlexibleFixedHorizontalArrangement: Arrangement.Horizontal
An Arrangement that will be used to space FlexibleBottomAppBar's with a fixed spacing.
Functions
exitAlwaysScrollBehavior
@ExperimentalMaterial3Api
@Composable
fun exitAlwaysScrollBehavior(
state: BottomAppBarState = rememberBottomAppBarState(),
canScroll: () -> Boolean = { true },
snapAnimationSpec: AnimationSpec<Float>? = MotionSchemeKeyTokens.FastSpatial.value(),
flingAnimationSpec: DecayAnimationSpec<Float>? = rememberSplineBasedDecay(),
): BottomAppBarScrollBehavior
Returns a BottomAppBarScrollBehavior. A bottom app bar that is set up with this BottomAppBarScrollBehavior will immediately collapse when the content is pulled up, and will immediately appear when the content is pulled down.
The returned BottomAppBarScrollBehavior is remembered across compositions.
Parameters
| state | the state object to be used to control or observe the bottom app bar's scroll state. See rememberBottomAppBarState for a state that is remembered across compositions. |
| canScroll | a callback used to determine whether scroll events are to be handled by this ExitAlwaysScrollBehavior |
| snapAnimationSpec | an optional AnimationSpec that defines how the bottom app bar snaps to either fully collapsed or fully extended state when a fling or a drag scrolled it into an intermediate position. If null is provided, the app bar will not snap and will remain in its current state. |
| flingAnimationSpec | an optional DecayAnimationSpec that defines how to fling the bottom app bar when the user flings the app bar itself, or the scrollable content. If null is provided, the app bar will not continue to animate its height based on the scroll velocity. |