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

Apache License 2.0
55 stars 86 forks source link

Simple Animation with Jetpack Compose #28

Open Omar-Maqboul opened 1 year ago

Omar-Maqboul commented 1 year ago

URL of codelab

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

Describe the problem when hit expand for the 1st item in the list, then scroll down to the last item, and scroll up back to the expanded item (1st item), you will see it unexpanded !

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions Android Studio version: API version of the emulator:

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

osuleymanova commented 1 year ago

Hello @Omar-Maqboul,

Please provide the requested information to proceed further. Be more specific what issue you have.

Shaderbug commented 1 year ago

Hello @osuleymanova,

I believe I also encountered the issue @Omar-Maqboul describes here and can provide the requested info.

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-compose-woof-animation

In which task and step of the codelab can this issue be found? After implementing Step 6 and later, also in the main branch

Describe the problem When a DogItem is scrolled off-screen, it's expanded state is not retained. This is probably caused by LazyColumn destroying the DogItem and its contained state when it goes off-screen and re-creating it when it comes back into view.

Steps to reproduce?

  1. Check out the main branch
  2. Build and launch app
  3. Click on first DogItem to expand it
  4. Scroll to bottom of the list
  5. Scroll back up again, see that the item is now collapsed

Versions Android Studio version:

Android Studio Flamingo | 2022.2.1 Beta 4
Build #AI-222.4459.24.2221.9645777, built on February 23, 2023
Runtime version: 17.0.6+0-b2043.56-9586694 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 16
Registry:
    external.system.auto.import.disabled=true
    ide.text.editor.with.preview.show.floating.toolbar=false
    gradle.version.catalogs.dynamic.support=true

API version of the emulator: Pixel 5 API 33

Additional information

Video of the issue