summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh M <daneshm90@gmail.com>2014-05-07 17:38:46 (GMT)
committerDanesh M <daneshm90@gmail.com>2014-05-07 18:06:01 (GMT)
commitf29645157ef778f245bc5b4f198c85ce585bb482 (patch)
tree6be9d1918e0ca8ab9006c1bd36be0c99ed434353
parentaaadc7841203af5492b2cb830cc15bc9375448d7 (diff)
downloadandroid_packages_apps_Trebuchet-f29645157ef778f245bc5b4f198c85ce585bb482.zip
android_packages_apps_Trebuchet-f29645157ef778f245bc5b4f198c85ce585bb482.tar.gz
android_packages_apps_Trebuchet-f29645157ef778f245bc5b4f198c85ce585bb482.tar.bz2
Trebuchet : Fix overscroll overlay issue
When overscrolling in the app drawer, certain effect/page combinations cause the pages to be overlayed. Reproduction : - Have 2 pages in the app drawer - Set scroll effect carousel,rotate up/down - Overscroll one of the pages and let it settle - Should see first and second page stacked together Change-Id: Iaa2b06970e2f5d3dda51ce5bf2259523738f7779
-rw-r--r--src/com/android/launcher3/AppsCustomizePagedView.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 7e67f7c..882cd9d 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -233,8 +233,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// Relating to the scroll and overscroll effects
private static float TRANSITION_MAX_ROTATION = 22;
private static final float ALPHA_CUTOFF_THRESHOLD = 0.01f;
- private boolean mOverscrollTransformsSet;
- private float mLastOverscrollPivotX;
public static boolean DISABLE_ALL_APPS = false;
@@ -1489,42 +1487,15 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
if (isInOverscroll) {
int index = 0;
- float pivotX = 0f;
- final float leftBiasedPivot = 0.35f;
- final float rightBiasedPivot = 0.65f;
final int lowerIndex = 0;
final int upperIndex = getChildCount() - 1;
final boolean isLeftPage = mOverScrollX < 0;
index = (!isRtl && isLeftPage) || (isRtl && !isLeftPage) ? lowerIndex : upperIndex;
- pivotX = isLeftPage ? rightBiasedPivot : leftBiasedPivot;
-
View v = getPageAt(index);
-
- if (!mOverscrollTransformsSet || Float.compare(mLastOverscrollPivotX, pivotX) != 0) {
- mOverscrollTransformsSet = true;
- mLastOverscrollPivotX = pivotX;
- v.setCameraDistance(mDensity * mCameraDistance);
- v.setPivotX(v.getMeasuredWidth() * pivotX);
- }
-
float scrollProgress = getScrollProgress(screenCenter, v, index);
float rotation = -TRANSITION_MAX_ROTATION * scrollProgress;
v.setRotationY(rotation);
- } else {
- if (mOverscrollTransformsSet) {
- mOverscrollTransformsSet = false;
- View v0 = getPageAt(0);
- View v1 = getPageAt(getChildCount() - 1);
- v0.setRotationY(0);
- v1.setRotationY(0);
- v0.setCameraDistance(mDensity * mCameraDistance);
- v1.setCameraDistance(mDensity * mCameraDistance);
- v0.setPivotX(v0.getMeasuredWidth() / 2);
- v1.setPivotX(v1.getMeasuredWidth() / 2);
- v0.setPivotY(v0.getMeasuredHeight() / 2);
- v1.setPivotY(v1.getMeasuredHeight() / 2);
- }
}
}