Skip to content

Fix: Apply theme color to Card containers#144

Open
karinafukuda wants to merge 1 commit intogoogle-developer-training:mainfrom
karinafukuda:main
Open

Fix: Apply theme color to Card containers#144
karinafukuda wants to merge 1 commit intogoogle-developer-training:mainfrom
karinafukuda:main

Conversation

@karinafukuda
Copy link

@karinafukuda karinafukuda commented Dec 1, 2025

Problem:
The Card component in DogItem was not applying theme colors, resulting in list items displaying different colors than the Google Developers codelab reference images.

Solution:
Added color configuration to the Card component by:

  1. Importing CardDefaults from Material3
  2. Setting the colors parameter with CardDefaults.cardColors()
  3. Applying MaterialTheme.colorScheme.secondaryContainer as the container background color
BEFORE CHANGES AFTER CHANGES
Screenshot 2025-12-01 at 14 39 31 Screenshot 2025-12-01 at 14 38 42

Problem:
The Card component in DogItem was not applying theme colors, resulting in list items displaying different colors than the Google Developers codelab reference images.

Solution:
Added color configuration to the Card component by:
1. Importing CardDefaults from Material3
2. Setting the colors parameter with CardDefaults.cardColors()
3. Applying MaterialTheme.colorScheme.secondaryContainer as the container background color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant