summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-11-10 18:35:01 (GMT)
committerAdnan <adnan@cyngn.com>2014-11-19 23:53:58 (GMT)
commit06646832ebf924c8f80182c66f53ecc13e1ad0f5 (patch)
tree3d84cfc641e9e09cba2cde0aec32b83dde194d46
parentfd36457fcfeee28c0cd6533796d51459990f8341 (diff)
downloadandroid_packages_apps_Trebuchet-06646832ebf924c8f80182c66f53ecc13e1ad0f5.zip
android_packages_apps_Trebuchet-06646832ebf924c8f80182c66f53ecc13e1ad0f5.tar.gz
android_packages_apps_Trebuchet-06646832ebf924c8f80182c66f53ecc13e1ad0f5.tar.bz2
Fix bug: Scroll Effect issues in Workspace
Repro: - Set HomeScreen Scroll Effect to Flip or Stack - Create at least 3 pages in HomeScreen - Switch rapidly back and forth between pages - Observe certain pages will be transparent Change-Id: I405a113fb947b193706d10921c2cf6ee7bb82b4f
-rw-r--r--src/com/android/launcher3/PagedView.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 27c9e06..b7b0e52 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -3185,10 +3185,10 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
v.setAlpha(alpha);
}
- // If the view has 0 alpha, we set it to be invisible so as to prevent
+ // If the view has 0 alpha, we move it off screen so as to prevent
// it from accepting touches
if (alpha == 0) {
- v.setVisibility(INVISIBLE);
+ v.setTranslationX(v.getMeasuredWidth() * -10f);
} else if (v.getVisibility() != VISIBLE) {
v.setVisibility(VISIBLE);
}
@@ -3230,8 +3230,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
v.setVisibility(VISIBLE);
}
} else {
- v.setTranslationX(0f);
- v.setVisibility(INVISIBLE);
+ v.setTranslationX(v.getMeasuredWidth() * -10f);
}
}
}