0

I have a weird situation with my LazyColumn. I have loaded some data from an API and want to show it in LazyColumn. And everything is fine until I scroll to the bottom of the list and try to scroll back to the top. When I try to scroll back to the top, it seems like the LazyColumn always resets and I end up at the bottom again and again. Only if I scrol very very slowly, I have a chance to come back to the top...

Does anyone have any idea how to debug this? I've used the LazyColumn many times and never encountered anything similar...

Thanks

  • 1
    Please share some code?. – RaBaKa 78 Jan 19 '22 at 08:13
  • @RaBaKa78 I can share my project: https://github.com/beslimir/YugiohDeckBuilder The LazyColumn is in the file FeaturedCardSection.kt It's a simple project, just at the beginning, whete I just fetch data from API and show it in LazyColumn. Ignore the design and the section above the LazyColumn :) – beslimir Jan 19 '22 at 08:21
  • I tested your app in my AVD, and it is acting normal, may be a bug in your AVD – RaBaKa 78 Jan 19 '22 at 10:22
  • I tested it on a real device and reproduced the error. – Stefano Sansone Jan 19 '22 at 10:31
  • @RaBaKa78 I set it now to 30 items, I think you could now produce it also.. I didn't manage to fix it yet, will continue to debug – beslimir Jan 19 '22 at 10:37
  • UPDATE: I found out that the issue with LazyColumn is connected with the place where I load the images with Coil (YugiohCardRow.kt file). When I use the images from the api data, the issue occures, but when I randomly set a picture from the project and fill the list with it, the issue is gone. I'm still not sure about this behavior, but I will continue with debugging... – beslimir Jan 19 '22 at 14:06
  • UPDATE: Loading with Glide fixed the issue. I still wonder why Coil wasn't working properly... – beslimir Jan 19 '22 at 14:15
  • I faced to the same bug did you find out why coil is producing that bug ? – MohammadBaqer May 05 '22 at 08:03

0 Answers0