ethanhua / Skeleton

A library provides an easy way to show skeleton loading view like Facebook and Alipay
3.68k stars 457 forks source link

Does not work with DiffUtill #53

Open Stashevskiy opened 3 years ago

Stashevskiy commented 3 years ago

Hello, I found that library does not work with DiffUtill. When a new list is added, it will scroll to the first position. Сould you fix this?

rwzhang commented 3 years ago

I also encountered the same problem, do you have a good solution

anocean2 commented 3 years ago

I also encountered the same problem

samvmisti commented 3 years ago

the same. this is because they replace your current adapter with their SkeletonAdapter when you call skeleton.show(). and they set your adapter again after you call skeleton.hide()

lambui09 commented 5 months ago

same issue: you can fix: in hide of the skeleton: check currentAdapter. quick fix: you can check if(page == 1){skeleton.hide()}. You should only call once.