Closed ScottCooper92 closed 5 years ago
I think the separate layout has to be provided for shimmer layout. Check this article https://medium.com/mindorks/android-design-shimmer-effect-fa7f74c68a93
stopShimmer
stops the shimmering animation, if you want it completely gone, then you do need to setShimmer(null)
. Adding hideShimmer
, showShimmer
methods seems fine, though.
PR for that is certainly welcome if you're up for it :)
Closed as part of #86
I might be using this library differently from how it was intended but I think this issue could be any easy fix.
I have my RecyclerView inside the ShimmerFrameLayout, when the view is first created RecyclerViewAdapter is given a list of
null
and the adapter represents each of thenull
s by creating placeholder ViewHolders, I then tell the ShimmerFrameLayout to start shimmering.Once content has arrived the nulls are replaced with actual data and the ViewHolders are populated, the shimmering is then stopped using
stopShimmer()
. The issue is that themShimmerDrawable
in ShimmerFrameLayout is still displayed meaning the content is masked.I can work around this by setting the shimmer to null when stopping it and then adding it again when starting like so:
Can this be handled internally by either hiding the drawable when stopping or through some other means?