Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support auto skeleton item size calculation. #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

puppywang
Copy link

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.

@Faltenreich
Copy link
Owner

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 Faltenreich added the bug Something isn't working label Jun 21, 2020
@puppywang
Copy link
Author

Got, I will try to fix it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants