Created
September 8, 2015 13:35
-
-
Save miva2/7a33b4300e6765cd35df to your computer and use it in GitHub Desktop.
onBackPressed in FragmentActivity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Take care of popping the fragment back stack or finishing the activity | |
* as appropriate. | |
*/ | |
public void onBackPressed() { | |
if (!mFragments.popBackStackImmediate()) { | |
supportFinishAfterTransition(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment