In my application, I have a navigation box, and how my application works, there is only one action, and if you select something from the navigation box, it will start / replace the current fragment. How can I do this so that when something is selected in the navigation box, and a new fragment starts the completion of the old fragment
I can not do
@Override public void onPause() {
because it will kill the application as there is only one action.
How to kill a fragment?
EDIT: my fragment transaction
Home HomeFragment = new Home(); transaction.replace(R.id.llhome, HomeFragment); transaction.addToBackStack(null); transaction.commit(); mDrawerList.setItemChecked(position, true); mDrawerLayout.closeDrawer(mDrawerList);
thanks
source share