public void mRemoveFragment(android.app.Fragment fragment){
android.app.FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);
ft.remove(fragment);
ft.commit();
}
use this function to remove the fragment. Where in setCustomAnimation, you can give your scripts. I have currently used the default ones provided by android