Skip to content

Commit

Permalink
bug fix on back press
Browse files Browse the repository at this point in the history
  • Loading branch information
JayyyR committed Dec 9, 2017
1 parent 32e96ee commit b807161
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public void onBackPressed() {
if (!mBackstackTags.isEmpty()) {
mFragmentManager.popBackStackImmediate();
mCurrentFragment = (SimpleFragment) mFragmentManager.findFragmentByTag(mBackstackTags.peek());
mCurrentFragment.setAtForefront(true);
mCurrentFragment.onShown();
} else {
finish();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public boolean onSimpleBackPressed() {
if (!mBackstackTags.isEmpty()) {
mChildFragmentManager.popBackStackImmediate();
mCurrentFragment = (SimpleFragment) mChildFragmentManager.findFragmentByTag(mBackstackTags.peek());
mCurrentFragment.setAtForefront(true);
mCurrentFragment.onShown();
return true;
}
}
Expand Down

0 comments on commit b807161

Please sign in to comment.