I am starting an activity and would rather have a alpha fade-in for startActivity()
, and a fade-out for the finish()
. How can I go about this in the Android SDK?
Starting from API level 5 you can call overridePendingTransition immediately to specify an explicit transition animation:
startActivity();
overridePendingTransition(R.anim.hold, R.anim.fade_in);
or
finish();
overridePendingTransition(R.anim.hold, R.anim.fade_out);