Loading core/java/com/android/internal/widget/FloatingToolbar.java +5 −2 Original line number Original line Diff line number Diff line Loading @@ -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) { Loading @@ -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) { Loading Loading @@ -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; } } Loading Loading
core/java/com/android/internal/widget/FloatingToolbar.java +5 −2 Original line number Original line Diff line number Diff line Loading @@ -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) { Loading @@ -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) { Loading Loading @@ -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; } } Loading