mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 11:55:20 +01:00
Added option for fixed nav menu in portrait mode
This commit is contained in:
@@ -68,6 +68,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private SwitchCompat swDateBold;
|
||||
private SwitchCompat swNavBarColorize;
|
||||
private SwitchCompat swPortrait2;
|
||||
private SwitchCompat swPortrait3;
|
||||
private SwitchCompat swLandscape;
|
||||
private SwitchCompat swLandscape3;
|
||||
private SwitchCompat swNavMessageCount;
|
||||
@@ -154,7 +155,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"theme", "startup", "cards", "beige", "tabular_card_bg", "shadow_unread",
|
||||
"date", "date_bold", "navbar_colorize", "portrait2", "landscape", "landscape3", "nav_count",
|
||||
"date", "date_bold", "navbar_colorize",
|
||||
"portrait2", "portrait3", "landscape", "landscape3", "nav_count",
|
||||
"threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_color",
|
||||
"highlight_unread", "highlight_color", "color_stripe",
|
||||
"avatars", "bimi", "gravatars", "favicons", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
||||
@@ -190,6 +192,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swDateBold = view.findViewById(R.id.swDateBold);
|
||||
swNavBarColorize = view.findViewById(R.id.swNavBarColorize);
|
||||
swPortrait2 = view.findViewById(R.id.swPortrait2);
|
||||
swPortrait3 = view.findViewById(R.id.swPortrait3);
|
||||
swLandscape = view.findViewById(R.id.swLandscape);
|
||||
swLandscape3 = view.findViewById(R.id.swLandscape3);
|
||||
swNavMessageCount = view.findViewById(R.id.swNavMessageCount);
|
||||
@@ -359,6 +362,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
swPortrait3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("portrait3", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swLandscape.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -1023,6 +1033,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swDateBold.setEnabled(swDate.isChecked());
|
||||
swNavBarColorize.setChecked(prefs.getBoolean("navbar_colorize", false));
|
||||
swPortrait2.setChecked(prefs.getBoolean("portrait2", false));
|
||||
swPortrait3.setChecked(prefs.getBoolean("portrait3", false));
|
||||
swPortrait3.setEnabled(normal);
|
||||
swLandscape.setChecked(prefs.getBoolean("landscape", true));
|
||||
swLandscape.setEnabled(normal);
|
||||
swLandscape3.setChecked(prefs.getBoolean("landscape3", true));
|
||||
|
||||
Reference in New Issue
Block a user