diff options
author | Adam Cohen <adamcohen@google.com> | 2014-09-08 19:45:43 +0200 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2014-09-09 16:25:10 +0200 |
commit | 8e894faadfce1d779b94692d8c7eccf558e23727 (patch) | |
tree | 2f150c031cb768b63f89123ac25a81845d93d703 | |
parent | 0f668f3c2be93ad9be221d868abb3d9a6e418f18 (diff) | |
download | android_packages_apps_Trebuchet-8e894faadfce1d779b94692d8c7eccf558e23727.tar.gz android_packages_apps_Trebuchet-8e894faadfce1d779b94692d8c7eccf558e23727.tar.bz2 android_packages_apps_Trebuchet-8e894faadfce1d779b94692d8c7eccf558e23727.zip |
Fixing a couple issues with bad AllApps state
Bug 17388923
Change-Id: I8f8a0163c0172d6f286a55d89793b843b092a3ca
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 5c6261dc5..1b95c2b3f 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -3469,6 +3469,15 @@ public class Launcher extends Activity fromView.findViewById(R.id.apps_customize_pane_content); final View page = content.getPageAt(content.getNextPage()); + + // We need to hide side pages of the Apps / Widget tray to avoid some ugly edge cases + int count = content.getChildCount(); + for (int i = 0; i < count; i++) { + View child = content.getChildAt(i); + if (child != page) { + child.setVisibility(View.INVISIBLE); + } + } final View revealView = fromView.findViewById(R.id.fake_page); // hideAppsCustomizeHelper is called in some cases when it is already hidden @@ -3615,6 +3624,19 @@ public class Launcher extends Activity page.setLayerType(View.LAYER_TYPE_NONE, null); } content.setPageBackgroundsVisible(true); + // Unhide side pages + int count = content.getChildCount(); + for (int i = 0; i < count; i++) { + View child = content.getChildAt(i); + child.setVisibility(View.VISIBLE); + } + + // Reset page transforms + page.setTranslationX(0); + page.setTranslationY(0); + page.setAlpha(1); + content.setCurrentPage(content.getNextPage()); + mAppsCustomizeContent.updateCurrentPageScroll(); } }); |