Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/214439
Change subject: Fix toolbar translucency when TOC closed ...................................................................... Fix toolbar translucency when TOC closed SimpleDrawerListener.onDrawerClosed is not called unless the DrawerLayout is closed after reaching a fully open state (i.e., not when slightly opened and closed again). This patch fixes the toolbar translucency checks so that setForceNoFace is reset to false whenever the drawer slides out of sight rather than relying on reaching onDrawerClosed. Bug: T100382 Change-Id: Ia3507fb9391d64c553801cd46c06b383c88f8bba --- M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/39/214439/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java index 39916fe..997316f 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java @@ -110,7 +110,6 @@ public void onDrawerClosed(View drawerView) { super.onDrawerClosed(drawerView); parentActivity.supportInvalidateOptionsMenu(); - ((PageActivity)parentActivity).getSearchBarHideHandler().setForceNoFade(false); if (!wasClicked) { funnel.logClose(); } @@ -122,13 +121,18 @@ public void onDrawerSlide(View drawerView, float slideOffset) { super.onDrawerSlide(drawerView, slideOffset); // make sure the ActionBar is showing - ((PageActivity)parentActivity).showToolbar(); + ((PageActivity) parentActivity).showToolbar(); + if (slideOffset != 0) { + ((PageActivity) parentActivity).getSearchBarHideHandler().setForceNoFade(true); + } // request the current section to highlight, if we haven't yet if (!sectionRequested) { - ((PageActivity)parentActivity).getSearchBarHideHandler().setForceNoFade(true); bridge.sendMessage("requestCurrentSection", new JSONObject()); sectionRequested = true; } + if (slideOffset == 0) { + ((PageActivity)parentActivity).getSearchBarHideHandler().setForceNoFade(false); + } } }); } -- To view, visit https://gerrit.wikimedia.org/r/214439 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3507fb9391d64c553801cd46c06b383c88f8bba Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Mholloway <mhollo...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits