Circular reveal animation too fast when hiding sheet
Opened this issue · 9 comments
On a Nexus 5 with android 6.0.1, the circular reveal works fine when clicking on the fab but plays too fast when it's reversed to hide the sheet.
I first saw that behavior in the app I'm coding using your great library but could witness it in the sample applicaiton as well. Maybe that's the intended behavior but it doesn't match the 'preview' visible in the readme.
The hide animation does look a bit fast but I'm not sure if I intentionally made it this way or if something changed in Android 6.0.1. Is the animation any different on older versions of Android?
The gif in the readme is also a bit laggy so it might just appear to be slower than it actually is.
It looks better on a Galaxy Nexus under 4.3, though a tad fast to my liking ^^ It might be related to CPU load because my app is not optimized yet.
What strikes me is that I can't seem to see the circular unreveal on 6.0.1, looks like the sheet disapears and the button pops in a few frames.
Maybe expose an interface so we could fiddle with the values and not bother you ?
The library that was implemented to make the animation (CircularReveal) only works when a layout is opening, it doesn't animate on the closing. So do you have any thoughts on how to animate it while closing?
@f8full
Do you happen to be using Proguard? The animations can be incredibly choppy if the Proguard rules in the readme aren't added.
I've also noticed that when there are very complex view layouts on screen, the animation can lag a bit. Can you try the sample app on your devices and see if the animation is any different? If it's not laggy on the sample app, then you might want to try optimizing your layouts and see if that helps.
@joaosardinha
It's already animating when closing. It's just that the sheet's visibility is being hidden partway through in an attempt to blend the multiple animations together.
Well yea it's animating but looks really weird >.<
Alright, after more investigation, my client code was faulty. Sorry about that.
Your library is great, I even learnt how to circular reveal by reading it 👍
Had a big brain fart : I thought my problem was in the sheet reveal, and not hiding.
I can confirm the sample app displays the same "faulty" behavior on closing : circular unreveal last for a few frames and button pops. This is weird because the reveal from fab to sheet just looks perfect.
I don't use proguard and yeah, my layouts are a bit complex. I'll make sure to investigate deeper after the all nighters and release :)
The animation values may need some tweaking. I don't have time to look at it right now but feel free to play around with it and submit a PR if you think it looks good!
Sure thing ! And maybe, I'd code an interface to allow client code to tweak it. Just maybe because I never contributed to a library before. In fact, I never contributed at all. But I'm eager to learn and we all start somewhere. I might bother you if after RTFM I'm still unsure on how to proceed.