Skip to content

Material Theming: Android Basics with Compose #138

@Lordam0

Description

@Lordam0

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-material-theming?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-3-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-material-theming#3

In which task and step of the codelab can this issue be found?
4 Add Color

Describe the problem
Starting from the example code, the background of the "Card" element does not change color with the provided steps.

In order to change the color of the Card element, the parameter "surfaceContainerHighest" is required in Theme.kt.

Steps to reproduce?

  1. Donwload starter code
  2. Exchange Theme.kt and Color.kt as instructed
  3. Add the Card element in DogItem
  4. Color of Card element does not change.
    Versions
    Android Studio version: 2024.3.2 Patch 1
    API version of the emulator: 36.0

Additional information
It seems like the final solution is built on a different sdk version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions