mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Removed normal screen limitations
This commit is contained in:
@@ -239,11 +239,20 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
|
||||
else
|
||||
boot.execute(this, new Bundle(), "main:accounts");
|
||||
} else {
|
||||
// Enable 3-col mode on large screen / compact view on small screens
|
||||
if (getResources().getConfiguration().isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE))
|
||||
prefs.edit().putBoolean("landscape3", true).apply();
|
||||
else
|
||||
prefs.edit().putBoolean("compact", true).apply();
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
Configuration config = getResources().getConfiguration();
|
||||
|
||||
// Default enable compact mode for smaller screens
|
||||
if (!config.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE))
|
||||
editor.putBoolean("compact", true);
|
||||
|
||||
// Default disable landscape columns for small screens
|
||||
if (!config.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_NORMAL)) {
|
||||
editor.putBoolean("landscape", false);
|
||||
editor.putBoolean("landscape3", false);
|
||||
}
|
||||
|
||||
editor.apply();
|
||||
|
||||
if (Helper.isNight(this))
|
||||
setTheme(R.style.AppThemeBlueOrangeDark);
|
||||
|
||||
Reference in New Issue
Block a user