From cac3b336b832e00353a666aaf373a0123b486aac Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 2 Jan 2020 10:52:41 +0100 Subject: [PATCH] Disable three column mode --- app/src/main/java/eu/faircode/email/ActivityView.java | 1 - app/src/main/java/eu/faircode/email/DrawerLayoutEx.java | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index 2a85b7d570..31c2314b60 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -155,7 +155,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB drawerLayout = findViewById(R.id.drawer_layout); drawerLayout.setup(getResources().getConfiguration()); - // drawerLayout.setScrimColor(Helper.resolveColor(this, R.attr.colorDrawerScrim)); drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.app_name, R.string.app_name) { public void onDrawerClosed(View view) { diff --git a/app/src/main/java/eu/faircode/email/DrawerLayoutEx.java b/app/src/main/java/eu/faircode/email/DrawerLayoutEx.java index 4d5762bab7..7d176bdd1c 100644 --- a/app/src/main/java/eu/faircode/email/DrawerLayoutEx.java +++ b/app/src/main/java/eu/faircode/email/DrawerLayoutEx.java @@ -32,7 +32,7 @@ import androidx.annotation.Nullable; import androidx.drawerlayout.widget.DrawerLayout; public class DrawerLayoutEx extends DrawerLayout { - private boolean locked; + private boolean locked = false; public DrawerLayoutEx(@NonNull Context context) { super(context); @@ -47,7 +47,9 @@ public class DrawerLayoutEx extends DrawerLayout { } void setup(Configuration config) { - Log.i("Drawer setup orientation=" + config.orientation); + setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim)); + +/* ViewGroup childContent = (ViewGroup) getChildAt(0); ViewGroup childDrawer = (ViewGroup) getChildAt(1); if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) { @@ -62,6 +64,7 @@ public class DrawerLayoutEx extends DrawerLayout { childContent.setPaddingRelative(0, 0, 0, 0); closeDrawers(); } + */ } @Override