diff options
-rw-r--r-- | core/java/com/android/internal/app/ActionBarImpl.java | 17 | ||||
-rw-r--r-- | core/res/res/anim/dock_bottom_enter.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/dock_bottom_exit.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/dock_left_enter.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/dock_left_exit.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/dock_right_enter.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/dock_right_exit.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/dock_top_enter.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/dock_top_exit.xml | 4 |
9 files changed, 21 insertions, 28 deletions
diff --git a/core/java/com/android/internal/app/ActionBarImpl.java b/core/java/com/android/internal/app/ActionBarImpl.java index f1dffa1..1ba6d43 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 7a2e94b..74a021b 100644 --- a/core/res/res/anim/dock_bottom_enter.xml +++ b/core/res/res/anim/dock_bottom_enter.xml @@ -19,8 +19,6 @@ <!-- Animation for when a dock window at the bottom of the screen is entering. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/decelerate_quad"> - <translate android:fromYDelta="75%" android:toYDelta="0" + <translate android:fromYDelta="100%" android:toYDelta="0" android:duration="@android:integer/config_mediumAnimTime"/> - <alpha android:fromAlpha="0.0" android:toAlpha="1.0" - android:duration="@android:integer/config_mediumAnimTime" /> </set> diff --git a/core/res/res/anim/dock_bottom_exit.xml b/core/res/res/anim/dock_bottom_exit.xml index c2fd15c..213b3d9 100644 --- a/core/res/res/anim/dock_bottom_exit.xml +++ b/core/res/res/anim/dock_bottom_exit.xml @@ -19,8 +19,6 @@ <!-- Animation for when a dock window at the bottom of the screen is exiting. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/accelerate_quad"> - <translate android:fromYDelta="0" android:toYDelta="75%" + <translate android:fromYDelta="0" android:toYDelta="100%" android:startOffset="100" android:duration="@android:integer/config_mediumAnimTime"/> - <alpha android:fromAlpha="1.0" android:toAlpha="0.0" - android:startOffset="100" android:duration="@android:integer/config_mediumAnimTime" /> </set> diff --git a/core/res/res/anim/dock_left_enter.xml b/core/res/res/anim/dock_left_enter.xml index b057f67..4fce35a 100644 --- a/core/res/res/anim/dock_left_enter.xml +++ b/core/res/res/anim/dock_left_enter.xml @@ -19,8 +19,6 @@ <!-- Animation for when a dock window at the left of the screen is entering. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/decelerate_quad"> - <translate android:fromXDelta="-75%" android:toXDelta="0" + <translate android:fromXDelta="-100%" android:toXDelta="0" android:duration="@android:integer/config_mediumAnimTime"/> - <alpha android:fromAlpha="0.0" android:toAlpha="1.0" - android:duration="@android:integer/config_mediumAnimTime" /> </set> diff --git a/core/res/res/anim/dock_left_exit.xml b/core/res/res/anim/dock_left_exit.xml index 576b1aa..bce203d 100644 --- a/core/res/res/anim/dock_left_exit.xml +++ b/core/res/res/anim/dock_left_exit.xml @@ -19,8 +19,6 @@ <!-- Animation for when a dock window at the right of the screen is exiting. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/accelerate_quad"> - <translate android:fromXDelta="0" android:toXDelta="-75%" + <translate android:fromXDelta="0" android:toXDelta="-100%" android:startOffset="100" android:duration="@android:integer/config_mediumAnimTime"/> - <alpha android:fromAlpha="1.0" android:toAlpha="0.0" - android:startOffset="100" android:duration="@android:integer/config_mediumAnimTime" /> </set> diff --git a/core/res/res/anim/dock_right_enter.xml b/core/res/res/anim/dock_right_enter.xml index e1bd190..26b8ad6 100644 --- a/core/res/res/anim/dock_right_enter.xml +++ b/core/res/res/anim/dock_right_enter.xml @@ -19,8 +19,6 @@ <!-- Animation for when a dock window at the right of the screen is entering. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/decelerate_quad"> - <translate android:fromXDelta="75%" android:toXDelta="0" + <translate android:fromXDelta="100%" android:toXDelta="0" android:duration="@android:integer/config_mediumAnimTime"/> - <alpha android:fromAlpha="0.0" android:toAlpha="1.0" - android:duration="@android:integer/config_mediumAnimTime" /> </set> diff --git a/core/res/res/anim/dock_right_exit.xml b/core/res/res/anim/dock_right_exit.xml index 6d778fa..6beda59 100644 --- a/core/res/res/anim/dock_right_exit.xml +++ b/core/res/res/anim/dock_right_exit.xml @@ -19,8 +19,6 @@ <!-- Animation for when a dock window at the right of the screen is exiting. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/accelerate_quad"> - <translate android:fromXDelta="0" android:toXDelta="75%" + <translate android:fromXDelta="0" android:toXDelta="100%" android:startOffset="100" android:duration="@android:integer/config_mediumAnimTime"/> - <alpha android:fromAlpha="1.0" android:toAlpha="0.0" - android:startOffset="100" android:duration="@android:integer/config_mediumAnimTime" /> </set> diff --git a/core/res/res/anim/dock_top_enter.xml b/core/res/res/anim/dock_top_enter.xml index f2e4cae..594b479 100644 --- a/core/res/res/anim/dock_top_enter.xml +++ b/core/res/res/anim/dock_top_enter.xml @@ -19,8 +19,6 @@ <!-- Animation for when a dock window at the top of the screen is entering. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/decelerate_quad"> - <translate android:fromYDelta="-75%" android:toYDelta="0" + <translate android:fromYDelta="-100%" android:toYDelta="0" android:duration="@android:integer/config_mediumAnimTime"/> - <alpha android:fromAlpha="0.0" android:toAlpha="1.0" - android:duration="@android:integer/config_mediumAnimTime" /> </set> diff --git a/core/res/res/anim/dock_top_exit.xml b/core/res/res/anim/dock_top_exit.xml index 7373695..b9691f6 100644 --- a/core/res/res/anim/dock_top_exit.xml +++ b/core/res/res/anim/dock_top_exit.xml @@ -19,8 +19,6 @@ <!-- Animation for when a dock window at the top of the screen is exiting. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/accelerate_quad"> - <translate android:fromYDelta="0" android:toYDelta="-75%" + <translate android:fromYDelta="0" android:toYDelta="-100%" android:startOffset="100" android:duration="@android:integer/config_mediumAnimTime"/> - <alpha android:fromAlpha="1.0" android:toAlpha="0.0" - android:startOffset="100" android:duration="@android:integer/config_mediumAnimTime" /> </set> |