From 06646832ebf924c8f80182c66f53ecc13e1ad0f5 Mon Sep 17 00:00:00 2001 From: Raj Yengisetty Date: Mon, 10 Nov 2014 10:35:01 -0800 Subject: 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 --- src/com/android/launcher3/PagedView.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 27c9e06f9..b7b0e5219 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); } } } -- cgit v1.2.3