Added "1.5" column mode

This commit is contained in:
M66B 2020-08-07 16:09:25 +02:00
parent dacdc16559
commit 45fdf9efc6
3 changed files with 4 additions and 6 deletions

View File

@ -197,7 +197,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
Log.i("Drawer opened");
owner.start();
if (normal && landscape && landscape3 &&
if (normal && landscape3 &&
config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
drawerLayout.setDrawerLockMode(LOCK_MODE_LOCKED_OPEN);
childContent.setPaddingRelative(childDrawer.getLayoutParams().width, 0, 0, 0);
@ -214,7 +214,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
else
owner.stop();
if (normal && landscape && landscape3 &&
if (normal && landscape3 &&
config.orientation == Configuration.ORIENTATION_LANDSCAPE)
childContent.setPaddingRelative(
Math.round(slideOffset * childDrawer.getLayoutParams().width), 0, 0, 0);

View File

@ -51,10 +51,9 @@ public class DrawerLayoutEx extends DrawerLayout {
void setup(Configuration config, View drawerContainer, ActionBarDrawerToggle drawerToggle) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
boolean normal = config.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_NORMAL);
boolean landscape = prefs.getBoolean("landscape", true);
boolean landscape3 = prefs.getBoolean("landscape3", false);
if (normal && landscape && landscape3 &&
if (normal && landscape3 &&
config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
setScrimColor(Color.TRANSPARENT);
openDrawer(drawerContainer, false);

View File

@ -273,7 +273,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("landscape", checked).apply();
swLandscape3.setEnabled(checked);
}
});
@ -794,7 +793,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swLandscape.setChecked(prefs.getBoolean("landscape", true));
swLandscape.setEnabled(normal);
swLandscape3.setChecked(prefs.getBoolean("landscape3", false));
swLandscape3.setEnabled(normal && swLandscape.isChecked());
swLandscape3.setEnabled(normal);
swThreading.setChecked(prefs.getBoolean("threading", true));
swThreadingUnread.setChecked(prefs.getBoolean("threading_unread", false));