summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNebojsa Cvetkovic <nebkat@gmail.com>2013-06-14 11:35:55 (GMT)
committerNebojsa Cvetkovic <nebkat@gmail.com>2013-06-14 11:35:55 (GMT)
commitfa9e38bd3d3c7326ec1666e75c69ac974c33d254 (patch)
treef1aa236113e2114c8e5d41165dfe82cc75704fa5
parent028bb8ee7ae71c124d2e15217321cd93ae8628fd (diff)
downloadandroid_packages_apps_Trebuchet-fa9e38bd3d3c7326ec1666e75c69ac974c33d254.zip
android_packages_apps_Trebuchet-fa9e38bd3d3c7326ec1666e75c69ac974c33d254.tar.gz
android_packages_apps_Trebuchet-fa9e38bd3d3c7326ec1666e75c69ac974c33d254.tar.bz2
LauncherViewPropertyAnimator: Implement end()
Change-Id: Ic7a0c98b937dc5fc8d429ab38303865dae9c7686
-rw-r--r--src/com/cyanogenmod/trebuchet/Launcher.java4
-rw-r--r--src/com/cyanogenmod/trebuchet/LauncherViewPropertyAnimator.java11
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java2
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 {