mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-27 16:33:47 +00:00
Three columns mode (2)
This commit is contained in:
parent
22c454335d
commit
6237e46040
2 changed files with 10 additions and 5 deletions
|
@ -50,7 +50,6 @@ import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.constraintlayout.widget.Group;
|
import androidx.constraintlayout.widget.Group;
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
import androidx.drawerlayout.widget.DrawerLayout;
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
@ -154,7 +153,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
content_pane = findViewById(R.id.content_pane);
|
content_pane = findViewById(R.id.content_pane);
|
||||||
|
|
||||||
drawerLayout = findViewById(R.id.drawer_layout);
|
drawerLayout = findViewById(R.id.drawer_layout);
|
||||||
drawerLayout.setup(getResources().getConfiguration());
|
|
||||||
|
|
||||||
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.app_name, R.string.app_name) {
|
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.app_name, R.string.app_name) {
|
||||||
public void onDrawerClosed(View view) {
|
public void onDrawerClosed(View view) {
|
||||||
|
@ -501,6 +499,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
@Override
|
@Override
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
super.onPostCreate(savedInstanceState);
|
super.onPostCreate(savedInstanceState);
|
||||||
|
drawerLayout.setup(getResources().getConfiguration());
|
||||||
drawerToggle.syncState();
|
drawerToggle.syncState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@ package eu.faircode.email;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.os.Parcelable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
import android.view.Gravity;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -49,7 +51,6 @@ public class DrawerLayoutEx extends DrawerLayout {
|
||||||
void setup(Configuration config) {
|
void setup(Configuration config) {
|
||||||
setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim));
|
setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim));
|
||||||
|
|
||||||
/*
|
|
||||||
ViewGroup childContent = (ViewGroup) getChildAt(0);
|
ViewGroup childContent = (ViewGroup) getChildAt(0);
|
||||||
ViewGroup childDrawer = (ViewGroup) getChildAt(1);
|
ViewGroup childDrawer = (ViewGroup) getChildAt(1);
|
||||||
if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||||
|
@ -62,9 +63,14 @@ public class DrawerLayoutEx extends DrawerLayout {
|
||||||
setDrawerLockMode(LOCK_MODE_UNLOCKED);
|
setDrawerLockMode(LOCK_MODE_UNLOCKED);
|
||||||
setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim));
|
setScrimColor(Helper.resolveColor(getContext(), R.attr.colorDrawerScrim));
|
||||||
childContent.setPaddingRelative(0, 0, 0, 0);
|
childContent.setPaddingRelative(0, 0, 0, 0);
|
||||||
closeDrawers();
|
|
||||||
}
|
}
|
||||||
*/
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onRestoreInstanceState(Parcelable state) {
|
||||||
|
super.onRestoreInstanceState(state);
|
||||||
|
locked = (getDrawerLockMode(Gravity.LEFT) == LOCK_MODE_LOCKED_OPEN ||
|
||||||
|
getDrawerLockMode(Gravity.RIGHT) == LOCK_MODE_LOCKED_OPEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue