Skip to content

Commit

Permalink
Set restored fragment to mFragment when Activity is restored
Browse files Browse the repository at this point in the history
Signed-off-by: Arka Prava Basu <[email protected]>
  • Loading branch information
archie94 committed Feb 17, 2019
1 parent 693db02 commit 249f456
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/havenapp/main/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public void onCreate(Bundle savedInstanceState) {
getSupportFragmentManager().beginTransaction()
.add(R.id.settings_fragment, mFragment)
.commit();
} else {
mFragment = (SettingsFragment) getSupportFragmentManager().findFragmentById(R.id.settings_fragment);
}

getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Expand Down

0 comments on commit 249f456

Please sign in to comment.