Browse Source

Save drawer toggle state

main
M66B 6 years ago
parent
commit
7922434ff5
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      app/src/main/java/eu/faircode/email/ActivityView.java

+ 9
- 0
app/src/main/java/eu/faircode/email/ActivityView.java View File

@ -204,6 +204,9 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack
fragmentTransaction.commit();
}
if (savedInstanceState != null)
drawerToggle.setDrawerIndicatorEnabled(savedInstanceState.getBoolean("toggle"));
new SimpleTask<Long>() {
@Override
protected Long onLoad(Context context, Bundle args) throws Throwable {
@ -292,6 +295,12 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack
checkIntent(getIntent());
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean("toggle", drawerToggle.isDrawerIndicatorEnabled());
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);


Loading…
Cancel
Save