Added "1.5" column mode

pull/184/head
M66B 4 years ago
parent dacdc16559
commit 45fdf9efc6

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

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

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

Loading…
Cancel
Save