//
Instantiate a new fragment. FragmentnewFragment =CountingFragment.newInstance(mStackLevel);
//
Add the fragment to the activity, pushing this transaction //
on to the back stack. FragmentTransactionft =getFragmentManager().beginTransaction(); ft.replace(R.id.simple_fragment,newFragment); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); ft.addToBackStack(null); ft.commit(); }