How to animate fragments in Android?

view story

http://stackoverflow.com – Before implementing animations, my code for my frag swap looked something like this and worked as intended. if(tempmainfrag == null) { // Create an instance of MainListFragment tempmainfrag = new MainListFragment(); //made a context parameter to pass the context // In case this activity was started with special instructions from an Intent, // pass the Intent's extras to the fragment as arguments tempmainfrag.setArguments(getIntent().getExtras()); } else { Bundle temp = tempmainfrag.getArgumen (HowTos)