You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.
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 the nulls 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 the mShimmerDrawable 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:
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.
Summary:
PR for #85
It doesn't seem like the best implementation since I'm just nulling the Shimmer but it does the job.
I've tested this in the sample app by depending on the library project rather than the snapshot and added another button for toggling it on and off but haven't included any of that in this PR. If you would like me to I'll update it.
Pull Request resolved: #86
Differential Revision: D16053297
Pulled By: xiphirx
fbshipit-source-id: 9f50e1f56c1f2272fbb2da70dbea3680da6e03f1
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?
The text was updated successfully, but these errors were encountered: