-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
In which task and step of the codelab can this issue be found?
Task: Add a color
Step: Color Mapping
Describe the problem
Cards don't use the surfaceVariant color automatically. I had to specify it in the code:
Card(
modifier = modifier,
colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surfaceVariant)
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(dimensionResource(id = R.dimen.padding_small))
) {
DogIcon(dog.imageResourceId)
DogInformation(dog.name, dog.age)
}
}
Steps to reproduce?
Just follow the codelab normally, and add the card without explicitly specifying a color for it.
Versions
Android Studio version: Narwhal 2025.1.1 Patch 1
API version of the emulator: API 36.0-ext18
Additional information
Without explicitly specifying surfaceVariant for the cards:

After specifying it:

JonnyWatkins and nikogenix
Metadata
Metadata
Assignees
Labels
No labels