CardColors
class CardColors
Represents Colors used in Card. Unlike other Material 3 components, Cards do not change their color appearance when they are disabled. All colors remain the same in enabled and disabled states.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
CardColors |
copy(Returns a copy of this CardColors, optionally overriding some of the values. |
open operator Boolean |
|
open Int |
hashCode() |
Public properties |
|
|---|---|
Color |
the color used for appName, only applies to |
Color |
the background color of this |
Color |
the content color of this |
Color |
the color used for subtitle, applies to |
Color |
|
Color |
Public constructors
CardColors
CardColors(
containerColor: Color,
contentColor: Color,
appNameColor: Color,
timeColor: Color,
titleColor: Color,
subtitleColor: Color
)
| Parameters | |
|---|---|
containerColor: Color |
the background color of this |
contentColor: Color |
the content color of this |
appNameColor: Color |
the color used for appName, only applies to |
timeColor: Color |
|
titleColor: Color |
|
subtitleColor: Color |
the color used for subtitle, applies to |
Public functions
copy
fun copy(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
appNameColor: Color = Color.Unspecified,
timeColor: Color = Color.Unspecified,
titleColor: Color = Color.Unspecified,
subtitleColor: Color = Color.Unspecified
): CardColors
Returns a copy of this CardColors, optionally overriding some of the values.
| Parameters | |
|---|---|
containerColor: Color = Color.Unspecified |
The container color of this |
contentColor: Color = Color.Unspecified |
The content color of this |
appNameColor: Color = Color.Unspecified |
The color used for appName, only applies to |
timeColor: Color = Color.Unspecified |
|
titleColor: Color = Color.Unspecified |
|
subtitleColor: Color = Color.Unspecified |
The color used for subtitle, applies to |
Public properties
containerColor
val containerColor: Color
the background color of this Card (overridden by the containerPainter parameter on Cards with image backgrounds).