androidx.compose.material3
TopAppBarColors
Class
No hand-written docs yet.
Represents the colors used by a top app bar in different states. This implementation animates the container color according to the top app bar scroll state. It does not animate the leading, headline, or trailing colors.
class TopAppBarColors(
containerColor: Color,
scrolledContainerColor: Color,
navigationIconContentColor: Color,
titleContentColor: Color,
actionIconContentColor: Color,
subtitleContentColor: Color,
)
How to get one
Create it
TopAppBarColors(containerColor, scrolledContainerColor, navigationIconContentColor, titleContentColor, actionIconContentColor, subtitleContentColor)constructor
Ready-made values and functions that return it
Used by
Parameters that take a TopAppBarColors.
CenterAlignedTopAppBar(colors)LargeFlexibleTopAppBar(colors)LargeTopAppBar(colors)MediumFlexibleTopAppBar(colors)MediumTopAppBar(colors)TopAppBar(colors)TwoRowsTopAppBar(colors)
Properties
containerColor
val containerColor: Color
scrolledContainerColor
val scrolledContainerColor: Color
navigationIconContentColor
val navigationIconContentColor: Color
titleContentColor
val titleContentColor: Color
actionIconContentColor
val actionIconContentColor: Color
subtitleContentColorSince 1.9
val subtitleContentColor: Color
Functions
copy
fun copy(
containerColor: Color = this.containerColor,
scrolledContainerColor: Color = this.scrolledContainerColor,
navigationIconContentColor: Color = this.navigationIconContentColor,
titleContentColor: Color = this.titleContentColor,
actionIconContentColor: Color = this.actionIconContentColor,
subtitleContentColor: Color = this.subtitleContentColor,
): TopAppBarColors
Returns a copy of this TopAppBarColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”
Library docs
Represents the colors used by a top app bar in different states. This implementation animates the container color according to the top app bar scroll state. It does not animate the leading, headline, or trailing colors.