TopAppBarColors


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.

Summary

Public constructors

TopAppBarColors(
    containerColor: Color,
    scrolledContainerColor: Color,
    navigationIconContentColor: Color,
    titleContentColor: Color,
    actionIconContentColor: Color
)

create an instance with arbitrary colors, see TopAppBarColors for a factory method using the default material3 spec

Cmn

Public functions

TopAppBarColors
copy(
    containerColor: Color,
    scrolledContainerColor: Color,
    navigationIconContentColor: Color,
    titleContentColor: Color,
    actionIconContentColor: Color
)

Returns a copy of this TopAppBarColors, optionally overriding some of the values.

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn

Public properties

Color

the content color used for actions

Cmn
Color

the color used for the background of this BottomAppBar.

Cmn
Color

the content color used for the navigation icon

Cmn
Color

the container color when content is scrolled behind it

Cmn
Color

the content color used for the title

Cmn

Public constructors

TopAppBarColors

TopAppBarColors(
    containerColor: Color,
    scrolledContainerColor: Color,
    navigationIconContentColor: Color,
    titleContentColor: Color,
    actionIconContentColor: Color
)

create an instance with arbitrary colors, see TopAppBarColors for a factory method using the default material3 spec

Parameters
containerColor: Color

the color used for the background of this BottomAppBar. Use Color.Transparent to have no color.

scrolledContainerColor: Color

the container color when content is scrolled behind it

navigationIconContentColor: Color

the content color used for the navigation icon

titleContentColor: Color

the content color used for the title

actionIconContentColor: Color

the content color used for actions

Public functions

copy

fun copy(
    containerColor: Color = this.containerColor,
    scrolledContainerColor: Color = this.scrolledContainerColor,
    navigationIconContentColor: Color = this.navigationIconContentColor,
    titleContentColor: Color = this.titleContentColor,
    actionIconContentColor: Color = this.actionIconContentColor
): 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”

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

actionIconContentColor

val actionIconContentColorColor

the content color used for actions

containerColor

val containerColorColor

the color used for the background of this BottomAppBar. Use Color.Transparent to have no color.

val navigationIconContentColorColor

the content color used for the navigation icon

scrolledContainerColor

val scrolledContainerColorColor

the container color when content is scrolled behind it

titleContentColor

val titleContentColorColor

the content color used for the title