am 1b422a95: Merge "Hide the floating toolbar faster." into mnc-dev
* commit '1b422a95f7a3308359031b960c3b491a7eeec0dd': Hide the floating toolbar faster.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user