TopAppBarColors
-
Cmn
@ExperimentalMaterial3Api
class 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 |
|
---|---|
This function is deprecated. Use the TopAppBarColors constructor with subtitleContentColor |
Cmn
|
TopAppBarColors( create an instance with arbitrary colors, see |
Cmn
|
Public functions |
||
---|---|---|
TopAppBarColors |
copy( Returns a copy of this TopAppBarColors, optionally overriding some of the values. |
Cmn
|
open operator Boolean |
Cmn
|
|
open Int |
hashCode() |
Cmn
|
Public properties |
||
---|---|---|
Color |
the content color used for actions |
Cmn
|
Color |
the color used for the background of this TopAppBar. |
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 a subtitle |
Cmn
|
Color |
the content color used for the title |
Cmn
|
Public constructors
TopAppBarColors
TopAppBarColors(
containerColor: Color,
scrolledContainerColor: Color,
navigationIconContentColor: Color,
titleContentColor: Color,
actionIconContentColor: Color
)
TopAppBarColors
TopAppBarColors(
containerColor: Color,
scrolledContainerColor: Color,
navigationIconContentColor: Color,
titleContentColor: Color,
actionIconContentColor: Color,
subtitleContentColor: 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 TopAppBar. Use |
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 |
subtitleContentColor: Color |
the content color used for a subtitle |
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,
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”
Public properties
containerColor
val containerColor: Color
the color used for the background of this TopAppBar. Use Color.Transparent
to have no color.
navigationIconContentColor
val navigationIconContentColor: Color
the content color used for the navigation icon
scrolledContainerColor
val scrolledContainerColor: Color
the container color when content is scrolled behind it