Closed avalanchas closed 9 months ago
Hi @skydoves, thank you for the high praise, coming from you it means a lot! I have one more note though: as I mentioned above:
Personally, I would not close https://github.com/skydoves/AndroidVeil/issues/15 yet, because in a perfect world AndroidVeil would auto-mask a carousel layout as well
In my humble opinion I think we should reopen #15 until carousels can be auto-masked I hope I can get to this in the next few months
Description
This PR adds very simple functionality to give a
VeilLayout
(and thus by extension aVeilRecyclerFrameView
) a pre-made (prepared by the caller ahead of time)ShimmerFrameLayout
to show when veiled. This simply means that the custom "masking" process is skipped and the VeilLayout simply shows the defaultChild view - which, again, is already shimmeringThis means that the caller can just as well insert a Shimmer Layout for a carousel item, thereby going the first steps towards fixing #15 🎉 Personally, I would not close #15 yet, because in a perfect world AndroidVeil would auto-mask a carousel layout as well
A demo activity for a shimmering carousel is included in this PR
Types of changes
What types of changes does your code introduce?
This PR is fully compatible with previous versions because we simply assume
isPrepared = false
in all places, named parameters and xml attrs. Thus, the behaviour of existing apps does not change, only whenisPrepared
is set totrue
will the code stop adding the maskedshimmerContainer
Preparing a pull request for review