VeilLayout#maskElements was an array that was seemingly unused, but multiple calls to setLayout would retain all previously held views and append the new views.
VeilLayout#shimmerContainer would eventually grow in size as multiple setLayout calls were made. This was remedied by removing all the views contained on setLayout.
I'm not sure many people have the same use case as I do, but for some of the views that I have their internals have mutable visibility and require multiple refreshes of the shimmer container contents. I was thinking that maybe I should also add an invalidateVeil that skips the removal of the contained layout, but recalculates the shimmer container. Not sure this is something that you'd be interested in, but probably calls for a seperate "New feature" PR.
Gradle spotless apply passes on this PR.
Guidelines
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce?
[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Preparing a pull request for review
Ensure your change is properly formatted by running:
$ ./gradlew spotlessApply
Please correct any failures before requesting a review.
VeilLayout#maskElements was an array that was seemingly unused, but multiple calls to setLayout would retain all previously held views and append the new views.
VeilLayout#shimmerContainer would eventually grow in size as multiple setLayout calls were made. This was remedied by removing all the views contained on setLayout.
I'm not sure many people have the same use case as I do, but for some of the views that I have their internals have mutable visibility and require multiple refreshes of the shimmer container contents. I was thinking that maybe I should also add an
invalidateVeil
that skips the removal of the contained layout, but recalculates the shimmer container. Not sure this is something that you'd be interested in, but probably calls for a seperate "New feature" PR.Gradle spotless apply passes on this PR.
Guidelines
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce?
Preparing a pull request for review
Ensure your change is properly formatted by running:
Please correct any failures before requesting a review.