mirror of https://github.com/M66B/FairEmail.git
Skip closing fixed nav menu
This commit is contained in:
parent
c18e761486
commit
5c39f5d708
|
@ -109,6 +109,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
private ImageButton ibExpanderExtra;
|
private ImageButton ibExpanderExtra;
|
||||||
private RecyclerView rvMenuExtra;
|
private RecyclerView rvMenuExtra;
|
||||||
|
|
||||||
|
private boolean nav_fixed;
|
||||||
private boolean expanded;
|
private boolean expanded;
|
||||||
private AdapterNavAccount adapterNavAccount;
|
private AdapterNavAccount adapterNavAccount;
|
||||||
private AdapterNavUnified adapterNavUnified;
|
private AdapterNavUnified adapterNavUnified;
|
||||||
|
@ -263,7 +264,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
drawerContainer = findViewById(R.id.drawer_container);
|
drawerContainer = findViewById(R.id.drawer_container);
|
||||||
|
|
||||||
int drawerWidth;
|
int drawerWidth;
|
||||||
final boolean nav_fixed;
|
|
||||||
DisplayMetrics dm = getResources().getDisplayMetrics();
|
DisplayMetrics dm = getResources().getDisplayMetrics();
|
||||||
if (viewId == R.layout.activity_view_landscape_split && landscape3) {
|
if (viewId == R.layout.activity_view_landscape_split && landscape3) {
|
||||||
drawerWidth = Helper.dp2pixels(this, 300);
|
drawerWidth = Helper.dp2pixels(this, 300);
|
||||||
|
@ -282,7 +282,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
int screenWidth = Math.min(dm.widthPixels, dm.heightPixels);
|
int screenWidth = Math.min(dm.widthPixels, dm.heightPixels);
|
||||||
int dp320 = Helper.dp2pixels(this, 320);
|
int dp320 = Helper.dp2pixels(this, 320);
|
||||||
drawerWidth = Math.min(screenWidth - actionBarHeight, dp320);
|
drawerWidth = Math.min(screenWidth - actionBarHeight, dp320);
|
||||||
nav_fixed = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int dp48 = Helper.dp2pixels(this, 48);
|
int dp48 = Helper.dp2pixels(this, 48);
|
||||||
|
@ -770,7 +769,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
int count = getSupportFragmentManager().getBackStackEntryCount();
|
int count = getSupportFragmentManager().getBackStackEntryCount();
|
||||||
if (drawerLayout.isDrawerOpen(drawerContainer) &&
|
if (!nav_fixed &&
|
||||||
|
drawerLayout.isDrawerOpen(drawerContainer) &&
|
||||||
(!drawerLayout.isLocked(drawerContainer) || count == 1))
|
(!drawerLayout.isLocked(drawerContainer) || count == 1))
|
||||||
drawerLayout.closeDrawer(drawerContainer);
|
drawerLayout.closeDrawer(drawerContainer);
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue