In which task and step of the codelab can this issue be found?
Changing the color :
@Composable
fun DogItem(
dog: Dog,
modifier: Modifier = Modifier
) {
...
Card(
...
) {
Column(
modifier = Modifier
.animateContentSize(
...
)
)
.background(color = color)
) {...}
}
Describe the problem
The preview does not show the color change, running the app shows it works like designed
Steps to reproduce?
Just follow the codelab and at step 7 - [optional] Experiment with other animations look at the preview animated, it only shows green for collapsed and expanded. When you run the app you see that it works as depicted in the codelab for the preview. Probably the codelab is fine, but in this Android studio this is broken in the preview ?
VersionsAndroid Studio version:
Android Studio Hedgehog | 2023.1.1 Patch 2
Build #AI-231.9392.1.2311.11330709, built on January 19, 2024
Runtime version: 17.0.7+0-b2043.56-10550314 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
external.system.auto.import.disabled=true
debugger.new.tool.window.layout=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.experimental.ui=true
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? Changing the color : @Composable fun DogItem( dog: Dog, modifier: Modifier = Modifier ) { ... Card( ... ) { Column( modifier = Modifier .animateContentSize( ... ) ) .background(color = color) ) {...} }
Describe the problem The preview does not show the color change, running the app shows it works like designed
Steps to reproduce? Just follow the codelab and at step 7 - [optional] Experiment with other animations look at the preview animated, it only shows green for collapsed and expanded. When you run the app you see that it works as depicted in the codelab for the preview. Probably the codelab is fine, but in this Android studio this is broken in the preview ?
Versions Android Studio version: Android Studio Hedgehog | 2023.1.1 Patch 2 Build #AI-231.9392.1.2311.11330709, built on January 19, 2024 Runtime version: 17.0.7+0-b2043.56-10550314 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Registry: external.system.auto.import.disabled=true debugger.new.tool.window.layout=true ide.text.editor.with.preview.show.floating.toolbar=false ide.experimental.ui=true
Non-Bundled Plugins: com.github.elyspio.swaggercodegen (0.6.1)
API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.