summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java17
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java2
2 files changed, 13 insertions, 6 deletions
diff --git a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java
index 4e7eb05ef..a38d82606 100644
--- a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java
+++ b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java
@@ -2082,13 +2082,20 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
View v = getPageAt(i);
if (v != null) {
float scrollProgress = getScrollProgress(screenScroll, v, i);
- float rotation = 90.0f * -scrollProgress;
+ float rotation = 90.0f * scrollProgress;
v.setCameraDistance(mDensity * mCameraDistance);
- v.setTranslationX(v.getMeasuredWidth() * scrollProgress);
- v.setPivotX(left ? 0f : v.getMeasuredWidth());
- v.setPivotY(0f);
- v.setRotationY(rotation);
+ if (!mVertical) {
+ v.setTranslationX(v.getMeasuredWidth() * scrollProgress);
+ v.setPivotX(left ? 0f : v.getMeasuredWidth());
+ v.setPivotY(v.getMeasuredHeight() / 2);
+ v.setRotationY(-rotation);
+ } else {
+ v.setTranslationY(v.getMeasuredHeight() * scrollProgress);
+ v.setPivotX(v.getMeasuredWidth() / 2);
+ v.setPivotY(left ? 0f : v.getMeasuredHeight());
+ v.setRotationX(rotation);
+ }
if (mFadeInAdjacentScreens) {
float alpha = 1 - Math.abs(scrollProgress);
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index ca6cc2c0b..092f5a082 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -1675,7 +1675,7 @@ public class Workspace extends PagedView
cl.setCameraDistance(mDensity * mCameraDistance);
cl.setTranslationX(cl.getMeasuredWidth() * scrollProgress);
cl.setPivotX(left ? 0f : cl.getMeasuredWidth());
- cl.setPivotY(0f);
+ cl.setPivotY(cl.getMeasuredHeight() / 2);
cl.setRotationY(rotation);
if (mFadeInAdjacentScreens && !isSmall()) {