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

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

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

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