-
Notifications
You must be signed in to change notification settings - Fork 66
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
Fade into the background? #7
Comments
A fade in is a very good idea and something I have thought about since the creation of this library. Currently this is not supported but could be achieved by altering the View toggling behind showOriginal() and showSkeleton(). Things are different for the RecyclerView, since I am creating a separate adapter for the skeleton that replaces the original one when calling showSkeleton() in order to keep the library as unintrusive as possible. I will think about a solution and of course you are free to create a pull request which I would gladly review if you are in a hurry. |
Been reviewing the code and looking at adding this for both the mask types. In the process I've noticed that in the current implementation set the VISIBLE/INVISIBLE state of all the views within the parent. Am I reading that correctly? If so it causes havoc with views that are initially set to anything other than VISIBLE. If this is the case (and I think it is) more needs to be checked in that pass and original visibility state maintained. Agree? |
You are absolutely right. The original view state should be cached in order to maintain the original visibilities. I created a new issue for this bug which may be fixed by me in the near future or by someone other if it is of high priority: #9 |
A workaround can be achieved with: // Example callback that hides skeleton
private fun onDataLoaded() {
TransitionManager.beginDelayedTransition(skeleton)
skeleton.showOriginal()
} (Kotlin demo code from start page) |
I noticed that depending on colors chosen and time spent waiting, showOriginal() can be quite jarring. Thoughts on how hard or easy it would be to add a fade in or out animation?
The text was updated successfully, but these errors were encountered: