Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 202d94c2 authored by Abodunrinwa Toki's avatar Abodunrinwa Toki Committed by Android Git Automerger
Browse files

am 1b422a95: Merge "Hide the floating toolbar faster." into mnc-dev

* commit '1b422a95':
  Hide the floating toolbar faster.
parents 886a1400 1b422a95
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -357,6 +357,7 @@ public final class FloatingToolbar {
            mShowAnimation = createGrowFadeInFromBottom(mContentContainer);
            mDismissAnimation = createShrinkFadeOutFromBottomAnimation(
                    mContentContainer,
                    0,
                    new AnimatorListenerAdapter() {
                        @Override
                        public void onAnimationEnd(Animator animation) {
@@ -366,6 +367,7 @@ public final class FloatingToolbar {
                    });
            mHideAnimation = createShrinkFadeOutFromBottomAnimation(
                    mContentContainer,
                    150,
                    new AnimatorListenerAdapter() {
                        @Override
                        public void onAnimationEnd(Animator animation) {
@@ -1263,15 +1265,16 @@ public final class FloatingToolbar {
     * Creates a "shrink and fade out from bottom" animation for the specified view.
     *
     * @param view  The view to animate
     * @param startDelay  The start delay of the animation
     * @param listener  The animation listener
     */
    private static AnimatorSet createShrinkFadeOutFromBottomAnimation(
            View view, Animator.AnimatorListener listener) {
            View view, int startDelay, Animator.AnimatorListener listener) {
        AnimatorSet shrinkFadeOutFromBottomAnimation =  new AnimatorSet();
        shrinkFadeOutFromBottomAnimation.playTogether(
                ObjectAnimator.ofFloat(view, View.SCALE_Y, 1, 0.5f).setDuration(125),
                ObjectAnimator.ofFloat(view, View.ALPHA, 1, 0).setDuration(75));
        shrinkFadeOutFromBottomAnimation.setStartDelay(150);
        shrinkFadeOutFromBottomAnimation.setStartDelay(startDelay);
        shrinkFadeOutFromBottomAnimation.addListener(listener);
        return shrinkFadeOutFromBottomAnimation;
    }