mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Added option for fixed nav menu in portrait mode
This commit is contained in:
@@ -51,10 +51,12 @@ 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 portrait3 = prefs.getBoolean("portrait3", false);
|
||||
boolean landscape3 = prefs.getBoolean("landscape3", true);
|
||||
|
||||
if (normal && landscape3 &&
|
||||
config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (normal &&
|
||||
((portrait3 && config.orientation == Configuration.ORIENTATION_PORTRAIT) ||
|
||||
(landscape3 && config.orientation == Configuration.ORIENTATION_LANDSCAPE))) {
|
||||
setScrimColor(Color.TRANSPARENT);
|
||||
openDrawer(drawerContainer, false);
|
||||
drawerToggle.onDrawerOpened(drawerContainer);
|
||||
|
||||
Reference in New Issue
Block a user