Reputation: 437
Any idea on how I can stop the fade animation when invoking replace as below?
FragmentManager fm = activity.getFragmentManager();
FragmentTransaction transaction = fm.beginTransaction();
transaction.replace(Id,Fragment,Tag);
Upvotes: 5
Views: 5092
Reputation: 39846
simple:
transaction.setCustomAnimations(0,0);
You can also use this method to set any custom animation you want, by passing a reference to R.anim.
resource.
Upvotes: 5