SkeletonLayout icon indicating copy to clipboard operation
SkeletonLayout copied to clipboard

Support auto skeleton item size calculation.

Open puppywang opened this issue 4 years ago • 2 comments

In our real app usage, we would like not to supply the skeleton item size in RecyclerView.applySkeleton, we want it automatically calculated, so I create this simple PR, please check, thanks.

puppywang avatar Apr 02 '20 08:04 puppywang

Hi @puppywang, thank you for your contribution!

This improvement makes absolute sense and I will gladly add it to the library. Sadly your pull request does not work as expected yet. The demo app shows only one item at a time in its Skeleton as opposed to the three items that would have place. Maybe you can test this by yourself and improve your pull request.

Precondition: Set the skeletonItemSize of the RecyclerViewFragment to 0 in order to autocalculate the item count with your logic.

Thanks in advance and have a nice day!

Faltenreich avatar Apr 05 '20 09:04 Faltenreich

Got, I will try to fix it ASAP.

puppywang avatar Jul 21 '20 08:07 puppywang