From cdc6806aa76856549077b0c9eefd18dd66cbecdd Mon Sep 17 00:00:00 2001 From: Danesh M Date: Tue, 29 Sep 2015 13:58:02 -0700 Subject: Trebuchet : Fix drawer inset & search visibility - If we receive INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED/INTENT_ACTION_SEARCHABLES_CHANGED we call bindSearchablesChanged which re-adds a search bar and doesn't restore visibility. This patch ensures we don't show the search bar when its not suppose to. - Don't increment margins, since there is no guarantee that the method is only invoked once. Change-Id: I4054a2aaba50a3692c6059afe8efe9796fcd68f4 --- src/com/android/launcher3/AppDrawerContainer.java | 2 +- src/com/android/launcher3/Launcher.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/AppDrawerContainer.java b/src/com/android/launcher3/AppDrawerContainer.java index ed001fefa..f67bd9aa4 100644 --- a/src/com/android/launcher3/AppDrawerContainer.java +++ b/src/com/android/launcher3/AppDrawerContainer.java @@ -26,7 +26,7 @@ public class AppDrawerContainer extends InsettableFrameLayout { // Scrubber view = findViewById(R.id.app_drawer_scrubber_container); LinearLayout.LayoutParams llp = (LinearLayout.LayoutParams) view.getLayoutParams(); - llp.bottomMargin += insets.bottom - mInsets.bottom; + llp.bottomMargin = insets.bottom - mInsets.bottom; view.setLayoutParams(llp); } } diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index f98051d05..46b2ccb0b 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -5247,6 +5247,7 @@ public class Launcher extends Activity mQsb = null; } mSearchDropTargetBar.setQsbSearchBar(getQsbBar()); + mGrid.layout(this); } /** -- cgit v1.2.3