@Override public void onBackPressed() { FragmentManager fm = getSupportFragmentManager(); for(int i = 0; i < fm.getBackStackEntryCount(); ++i) { fm.popBackStack(); } } You see, here I have onBackPressed and is used to go back in fragments. And I need when the fragments run out showed an exit message. But I do not do anything, that is, it does not even exit the application.
How to solve a problem?
finish();have you tried? - Silento