diff options
author | Nebojsa Cvetkovic <nebkat@gmail.com> | 2013-06-14 12:35:55 +0100 |
---|---|---|
committer | Nebojsa Cvetkovic <nebkat@gmail.com> | 2013-06-14 12:35:55 +0100 |
commit | fa9e38bd3d3c7326ec1666e75c69ac974c33d254 (patch) | |
tree | f1aa236113e2114c8e5d41165dfe82cc75704fa5 /src | |
parent | 028bb8ee7ae71c124d2e15217321cd93ae8628fd (diff) | |
download | packages_apps_trebuchet-fa9e38bd3d3c7326ec1666e75c69ac974c33d254.zip packages_apps_trebuchet-fa9e38bd3d3c7326ec1666e75c69ac974c33d254.tar.gz packages_apps_trebuchet-fa9e38bd3d3c7326ec1666e75c69ac974c33d254.tar.bz2 |
LauncherViewPropertyAnimator: Implement end()
Change-Id: Ic7a0c98b937dc5fc8d429ab38303865dae9c7686
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Launcher.java | 4 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/LauncherViewPropertyAnimator.java | 11 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Launcher.java b/src/com/cyanogenmod/trebuchet/Launcher.java index 7569573..e2f35f2 100644 --- a/src/com/cyanogenmod/trebuchet/Launcher.java +++ b/src/com/cyanogenmod/trebuchet/Launcher.java @@ -1566,6 +1566,10 @@ public final class Launcher extends Activity mWorkspace.exitWidgetResizeMode(); if (alreadyOnHome && mState == State.WORKSPACE && !mWorkspace.isTouchActive() && openFolder == null) { + if (mStateAnimation != null) { + mStateAnimation.end(); + mStateAnimation = null; + } mWorkspace.moveToDefaultScreen(true); mHotseat.moveToDefaultScreen(true); } diff --git a/src/com/cyanogenmod/trebuchet/LauncherViewPropertyAnimator.java b/src/com/cyanogenmod/trebuchet/LauncherViewPropertyAnimator.java index ee67b7f..3a00225 100644 --- a/src/com/cyanogenmod/trebuchet/LauncherViewPropertyAnimator.java +++ b/src/com/cyanogenmod/trebuchet/LauncherViewPropertyAnimator.java @@ -79,7 +79,16 @@ public class LauncherViewPropertyAnimator extends Animator implements AnimatorLi @Override public void end() { - throw new RuntimeException("Not implemented"); + if (mViewPropertyAnimator != null) { + mViewPropertyAnimator.cancel(); + mTarget.setTranslationX(mTranslationX); + mTarget.setTranslationY(mTranslationY); + mTarget.setScaleX(mScaleX); + mTarget.setScaleY(mScaleY); + mTarget.setRotation(mRotation); + mTarget.setRotationY(mRotationY); + mTarget.setAlpha(mAlpha); + } } @Override diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index 83314f3..bb74c6f 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -4455,7 +4455,7 @@ public class Workspace extends PagedView } void moveToDefaultScreen(boolean animate) { - if (!isSmall()) { + if (!isSmall() && !mIsSwitchingState) { if (animate) { snapToPage(mDefaultHomescreen); } else { |