google-developer-training / basic-android-kotlin-compose-training-woof

Apache License 2.0
55 stars 87 forks source link

Simple Animation with Jetpack Compose #51

Open FearlessLeader opened 1 year ago

FearlessLeader commented 1 year ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-compose-woof-animation?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-woof-animation#6

In which task and step of the codelab can this issue be found? Step 7

Describe the problem

Item number 4.:

  1. Check out how the color changes when the list item is expanded. Non expanded list items are primaryContainer color and expanded list items are tertiaryContainer color.

In WoofAppPreview - Interactive Mode: color does not change from primaryContainer to tertiaryContainer (i.e. does not change from green to blue, stays green.) But, when running the code on an AVD, color will change from green to blue as shown in item number 4.

Steps to reproduce?

  1. Go to Split Code Window (Alt+Shift+Right) - Preview
  2. Click on Start Interactive Mode button
  3. See error: Column background color does NOT change from green to blue.

Versions Android Studio version:

Android Studio Giraffe | 2022.3.1 RC 1 Build #AI-223.8836.35.2231.10320515, built on June 14, 2023 Runtime version: 17.0.6+0-17.0.6b829.9-10027231 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 6.3.12-200.fc38.x86_64 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 12 Registry: editor.focus.mode.color.light=6b727d ide.editor.tab.selection.animation=true external.system.auto.import.disabled=true ide.text.editor.with.preview.show.floating.toolbar=false ide.instant.shutdown=false documentation.show.toolbar=true ide.new.editor.tabs.vertical.borders=true ide.balloon.shadow.size=0 editor.focus.mode.color.dark=6b727d

Non-Bundled Plugins: com.intellij.marketplace (223.8836.56) izhangzhihao.rainbow.brackets (2023.3.1) com.chrisrm.idea.MaterialThemeUI (8.4.1) com.mallowigi (85.1.0)

Current Desktop: KDE Android Studio Giraffe | 2022.3.1 RC 1 (Build #AI-223.8836.35.2231.10320515, built on June 14, 2023)

API version of the emulator:

Additional information Include screenshots if they would be useful in clarifying the problem.

================================ Copy of file: build.gradle (Module :app)

/*

android { compileSdk 33

defaultConfig {
    applicationId "com.example.woof"
    minSdk 21
    targetSdk 33
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    vectorDrawables {
        useSupportLibrary true
    }
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
    jvmTarget = '1.8'
}
buildFeatures {
    compose true
}
composeOptions {
    kotlinCompilerExtensionVersion compose_compiler_version
}
packagingOptions {
    resources {
        excludes += '/META-INF/{AL2.0,LGPL2.1}'
    }
}
namespace 'com.example.woof'

}

dependencies { implementation platform('androidx.compose:compose-bom:2023.01.00') implementation 'androidx.activity:activity-compose:1.6.1' implementation "androidx.compose.material:material" implementation "androidx.compose.ui:ui" implementation "androidx.compose.ui:ui-tooling-preview" implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.0' implementation "androidx.compose.material:material-icons-extended" implementation 'androidx.compose.material3:material3:1.1.1'

debugImplementation "androidx.compose.ui:ui-tooling"

}