From 2d5ca636e7579e48ffe253316a7675cb1ea7823a Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 17 Nov 2016 00:22:48 +0100 Subject: [PATCH] Remove flickering in the drawer which was introduced with the last cleanup. --- .../ui/ActionBar/DrawerLayoutContainer.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/DrawerLayoutContainer.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/DrawerLayoutContainer.java index b652c02ca..c5394bfd4 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/DrawerLayoutContainer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/DrawerLayoutContainer.java @@ -113,14 +113,12 @@ public class DrawerLayoutContainer extends FrameLayout { lp.bottomMargin = wi.getSystemWindowInsetBottom(); } - /* - private int getTopInset(Object insets) { + private int getTopInset(Object insets) { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */ if (Build.VERSION.SDK_INT >= 21) { return insets != null ? ((WindowInsets) insets).getSystemWindowInsetTop() : 0; } return 0; } - */ public void setDrawerLayout(ViewGroup layout) { drawerLayout = layout; @@ -150,11 +148,9 @@ public class DrawerLayoutContainer extends FrameLayout { setScrimOpacity(drawerPosition / (float) drawerLayout.getMeasuredWidth()); } - /* - public float getDrawerPosition() { + public float getDrawerPosition() { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */ return drawerPosition; } - */ public void cancelCurrentAnimation() { if (currentAnimation != null) { @@ -226,17 +222,13 @@ public class DrawerLayoutContainer extends FrameLayout { invalidate(); } - /* - private float getScrimOpacity() { + private float getScrimOpacity() { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */ return scrimOpacity; } - */ - /* - public View getDrawerLayout() { + public View getDrawerLayout() { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */ return drawerLayout; } - */ public void setParentActionBarLayout(ActionBarLayout layout) { parentActionBarLayout = layout;