Closed Bug 1268608 Opened 7 years ago Closed 7 years ago
Toolbar hides itself at varying speeds based on distance when it should be a snappy, constant speed
58 bytes, text/x-review-board-request
via https://bugzilla.mozilla.org/show_bug.cgi?id=1245493#c19: Anthony also pointed out the toolbar hide/show animation can be slow when you have the toolbar half exposed – we should look into keeping the speed consistent no matter the position – I think this is in DynamicToolbarAnimator (and the ANIMATION_DURATION constant). --- Associated code: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/gfx/DynamicToolbarAnimator.java#39 The reason we want to do this is if the toolbar pans away slowly, it makes FF feel slow. So we want it to pan quickly! STR: 1) On page content where the content is greater than a screen length 2) Scroll down and partially hide the toolbar 3) Release Expected: Animation occurs at the same speed no matter the position Actual: Animation has constant duration, changing speed based on distance As for the value to set it as, just make sure it looks snappy and we'll send builds/videos to antlam to check if it's good!
snorp recommended the interpolation be based on the current position of the toolbar to get a linear animation. I decided to change the DecelerateInterpolator to a LinearInterpolator to get the required effect.
By changing the Interpolator to be linear instead of decelerating, we should see an animation with constant speed. I've also reduced the animation time from 250 milliseconds to 150 to give it a snappier feel. Review commit: https://reviewboard.mozilla.org/r/60412/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/60412/
Attachment #8764703 - Flags: review?(s.kaspari)
Attachment #8764703 - Flags: review?(s.kaspari) → review+
Comment on attachment 8764703 [details] Bug 1268608 - Toolbar hiding should be a snappy, constant speed https://reviewboard.mozilla.org/r/60412/#review57604 ::: gradle.properties:3 (Diff revision 1) > org.gradle.parallel=true > org.gradle.daemon=true > +org.gradle.jvmargs=-Xmx3072M This shouldn't be here? :)
(In reply to Sebastian Kaspari (:sebastian) from comment #3) > Comment on attachment 8764703 [details] > Bug 1268608 - Toolbar hiding should be a snappy, constant speed > > https://reviewboard.mozilla.org/r/60412/#review57604 > > ::: gradle.properties:3 > (Diff revision 1) > > org.gradle.parallel=true > > org.gradle.daemon=true > > +org.gradle.jvmargs=-Xmx3072M > > This shouldn't be here? :) Whoops, thanks for the catch!
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/fx-team/rev/196a5285e75c Toolbar hiding should be a snappy, constant speed r=sebastian
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.