diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-06-21 22:12:21 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-06-22 18:02:26 +0200 |
commit | 8ad7f1563cc0c23aaeccb70ce37efe5c35afd9a1 (patch) | |
tree | ef254db53873ead948e0e557d300c06aace11995 | |
parent | 421c4c63539523d913de6e0f4980325f27af3072 (diff) | |
download | android_packages_apps_Trebuchet-cm-10.1.1.tar.gz android_packages_apps_Trebuchet-cm-10.1.1.tar.bz2 android_packages_apps_Trebuchet-cm-10.1.1.zip |
Actually stack effect is broken. Dragging an item from the current page to other fails, because
the page has an alpha value of 0, and the dragged icon falls into a hidden state.
Patchset 2: Fixed the overlap of views of stack effect on tablets
Change-Id: Ia18b29b95e77d92a2d1602cd77b027aa56047962
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index 099ab0ed5..878bd6898 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -1569,16 +1569,17 @@ public class Workspace extends PagedView // On large screens we need to fade the page as it nears its leftmost position alpha = mLeftScreenAlphaInterpolator.getInterpolation(1 - scrollProgress); } - cl.setTranslationX(translationX); cl.setScaleX(scale); cl.setScaleY(scale); cl.setAlpha(alpha); // If the view has 0 alpha, we set it to be invisible so as to prevent - // it from accepting touches + // it from accepting touches. Move the view to its original position to + // prevent overlap between views if (alpha <= 0) { cl.setVisibility(INVISIBLE); + cl.setTranslationX(0); } else if (cl.getVisibility() != VISIBLE) { cl.setVisibility(VISIBLE); } @@ -2234,8 +2235,16 @@ public class Workspace extends PagedView if (mTransitionEffect == TransitionEffect.Stack) { if (i <= mCurrentPage) { cl.setVisibility(VISIBLE); + cl.setAlpha(1.0f); + if (mFadeInAdjacentScreens) { + setCellLayoutFadeAdjacent(cl, 0.0f); + } } else { cl.setVisibility(INVISIBLE); + cl.setAlpha(0.0f); + if (mFadeInAdjacentScreens) { + setCellLayoutFadeAdjacent(cl, 1.0f); + } } } @@ -2297,6 +2306,14 @@ public class Workspace extends PagedView cl.setPivotX(cl.getMeasuredWidth() * 0.5f); cl.setPivotY(cl.getMeasuredHeight() * 0.5f); cl.setVisibility(VISIBLE); + + // Stack Effect + if (mTransitionEffect == TransitionEffect.Stack) { + cl.setAlpha(1.0f); + if (mFadeInAdjacentScreens) { + setCellLayoutFadeAdjacent(cl, 0.0f); + } + } } // Determine the pages alpha during the state transition |