Is there any way to override the pending transition by passing it actual Animation object instead of an ID to an animation resource?
From
startActivity(intent);
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
To
startActivity(intent);
overridePendingTransition(new MyFadeInAnimation(), new MyFadeOutAnimation());
If not, is there a way for me to manually register an animation resource (and attain an ID) programatically?
I really do not want to define the activity transition animations as XML for other reasons.
So one way to do this is to use Fragments. Set overridePendingTransition(0,0); for the Activity. and then in the Fragment, override onCreateAnimator() or if using the old animations, use android.support.v4.app.Fragment and override onCreateAnimation().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With