-
Notifications
You must be signed in to change notification settings - Fork 12
Animate activity transitions per Activity basis
rutura edited this page Apr 16, 2017
·
1 revision
- Quick Code:
@Override
public void onClick(View v) {
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
overridePendingTransition(R.anim.activity_open_enter, R.anim.activity_open_exit);
}
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(R.anim.activity_close_enter, R.anim.activity_close_exit);
}
- Animate activity transitions per activity basis
- Call overridePendingTransition right after you call startActivity() or finish() and the animations you pass in the arguments are applied
- Animations are defined in resources : res/anim/
- Animations can also be applied per application.This is done at the theme level.App1.13.1 shows that.
- Relevant files :