diff --git a/core/java/com/android/internal/app/ActionBarImpl.java b/core/java/com/android/internal/app/ActionBarImpl.java index f1dffa1f859ce..1ba6d438b85e5 100644 --- a/core/java/com/android/internal/app/ActionBarImpl.java +++ b/core/java/com/android/internal/app/ActionBarImpl.java @@ -51,6 +51,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.accessibility.AccessibilityEvent; +import android.view.animation.AnimationUtils; import android.widget.SpinnerAdapter; import java.lang.ref.WeakReference; @@ -596,19 +597,23 @@ public class ActionBarImpl extends ActionBar { if (mCurWindowVisibility == View.VISIBLE && (mShowHideAnimationEnabled || alwaysAnimate)) { mTopVisibilityView.setAlpha(0); + mTopVisibilityView.setTranslationY(-mTopVisibilityView.getHeight()); AnimatorSet anim = new AnimatorSet(); AnimatorSet.Builder b = anim.play(ObjectAnimator.ofFloat(mTopVisibilityView, "alpha", 1)); + b.with(ObjectAnimator.ofFloat(mTopVisibilityView, "translationY", 0)); if (mContentView != null) { b.with(ObjectAnimator.ofFloat(mContentView, "translationY", -mTopVisibilityView.getHeight(), 0)); - mTopVisibilityView.setTranslationY(-mTopVisibilityView.getHeight()); - b.with(ObjectAnimator.ofFloat(mTopVisibilityView, "translationY", 0)); } if (mSplitView != null && mContextDisplayMode == CONTEXT_DISPLAY_SPLIT) { mSplitView.setAlpha(0); + mSplitView.setTranslationY(mSplitView.getHeight()); mSplitView.setVisibility(View.VISIBLE); b.with(ObjectAnimator.ofFloat(mSplitView, "alpha", 1)); + b.with(ObjectAnimator.ofFloat(mSplitView, "translationY", 0)); } + anim.setInterpolator(AnimationUtils.loadInterpolator(mContext, + com.android.internal.R.interpolator.decelerate_quad)); anim.addListener(mShowListener); mCurrentShowAnim = anim; anim.start(); @@ -638,16 +643,20 @@ public class ActionBarImpl extends ActionBar { mContainerView.setTransitioning(true); AnimatorSet anim = new AnimatorSet(); AnimatorSet.Builder b = anim.play(ObjectAnimator.ofFloat(mTopVisibilityView, "alpha", 0)); + b.with(ObjectAnimator.ofFloat(mTopVisibilityView, "translationY", + -mTopVisibilityView.getHeight())); if (mContentView != null) { b.with(ObjectAnimator.ofFloat(mContentView, "translationY", 0, -mTopVisibilityView.getHeight())); - b.with(ObjectAnimator.ofFloat(mTopVisibilityView, "translationY", - -mTopVisibilityView.getHeight())); } if (mSplitView != null && mSplitView.getVisibility() == View.VISIBLE) { mSplitView.setAlpha(1); b.with(ObjectAnimator.ofFloat(mSplitView, "alpha", 0)); + b.with(ObjectAnimator.ofFloat(mSplitView, "translationY", + mSplitView.getHeight())); } + anim.setInterpolator(AnimationUtils.loadInterpolator(mContext, + com.android.internal.R.interpolator.accelerate_quad)); anim.addListener(mHideListener); mCurrentShowAnim = anim; anim.start(); diff --git a/core/res/res/anim/dock_bottom_enter.xml b/core/res/res/anim/dock_bottom_enter.xml index 7a2e94beb2923..74a021b90f24f 100644 --- a/core/res/res/anim/dock_bottom_enter.xml +++ b/core/res/res/anim/dock_bottom_enter.xml @@ -19,8 +19,6 @@ - - diff --git a/core/res/res/anim/dock_bottom_exit.xml b/core/res/res/anim/dock_bottom_exit.xml index c2fd15c5a86d6..213b3d91a5f95 100644 --- a/core/res/res/anim/dock_bottom_exit.xml +++ b/core/res/res/anim/dock_bottom_exit.xml @@ -19,8 +19,6 @@ - - diff --git a/core/res/res/anim/dock_left_enter.xml b/core/res/res/anim/dock_left_enter.xml index b057f67aa08bc..4fce35ab3678a 100644 --- a/core/res/res/anim/dock_left_enter.xml +++ b/core/res/res/anim/dock_left_enter.xml @@ -19,8 +19,6 @@ - - diff --git a/core/res/res/anim/dock_left_exit.xml b/core/res/res/anim/dock_left_exit.xml index 576b1aab7fe88..bce203dc3c452 100644 --- a/core/res/res/anim/dock_left_exit.xml +++ b/core/res/res/anim/dock_left_exit.xml @@ -19,8 +19,6 @@ - - diff --git a/core/res/res/anim/dock_right_enter.xml b/core/res/res/anim/dock_right_enter.xml index e1bd1906a84b5..26b8ad6ee6b02 100644 --- a/core/res/res/anim/dock_right_enter.xml +++ b/core/res/res/anim/dock_right_enter.xml @@ -19,8 +19,6 @@ - - diff --git a/core/res/res/anim/dock_right_exit.xml b/core/res/res/anim/dock_right_exit.xml index 6d778fa4522b9..6beda5927b3f0 100644 --- a/core/res/res/anim/dock_right_exit.xml +++ b/core/res/res/anim/dock_right_exit.xml @@ -19,8 +19,6 @@ - - diff --git a/core/res/res/anim/dock_top_enter.xml b/core/res/res/anim/dock_top_enter.xml index f2e4cae149c10..594b47950f078 100644 --- a/core/res/res/anim/dock_top_enter.xml +++ b/core/res/res/anim/dock_top_enter.xml @@ -19,8 +19,6 @@ - - diff --git a/core/res/res/anim/dock_top_exit.xml b/core/res/res/anim/dock_top_exit.xml index 7373695b5e849..b9691f6446a7d 100644 --- a/core/res/res/anim/dock_top_exit.xml +++ b/core/res/res/anim/dock_top_exit.xml @@ -19,8 +19,6 @@ - -