Three column mode improvement

This commit is contained in:
M66B 2020-01-02 20:39:25 +01:00
parent 61e0f7f156
commit d1bdb7f4ed
2 changed files with 4 additions and 3 deletions

View File

@ -499,7 +499,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
@Override @Override
protected void onPostCreate(Bundle savedInstanceState) { protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState); super.onPostCreate(savedInstanceState);
drawerLayout.setup(getResources().getConfiguration()); drawerLayout.setup(getResources().getConfiguration(), drawerContainer);
drawerToggle.syncState(); drawerToggle.syncState();
} }
@ -540,7 +540,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
@Override @Override
public void onConfigurationChanged(Configuration newConfig) { public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
drawerLayout.setup(newConfig); drawerLayout.setup(newConfig, drawerContainer);
drawerToggle.onConfigurationChanged(newConfig); drawerToggle.onConfigurationChanged(newConfig);
} }

View File

@ -48,7 +48,7 @@ public class DrawerLayoutEx extends DrawerLayout {
super(context, attrs, defStyle); super(context, attrs, defStyle);
} }
void setup(Configuration config) { void setup(Configuration config, View drawerContainer) {
setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim)); setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim));
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
@ -64,6 +64,7 @@ public class DrawerLayoutEx extends DrawerLayout {
setDrawerLockMode(LOCK_MODE_UNLOCKED); setDrawerLockMode(LOCK_MODE_UNLOCKED);
setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim)); setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim));
childContent.setPaddingRelative(0, 0, 0, 0); childContent.setPaddingRelative(0, 0, 0, 0);
closeDrawer(drawerContainer, false);
} }
} }
} }