Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Activity Animation
@Override
public void onClick(View v) {
startActivity(new Intent(this, SecondActivity.class));
switch (v.getId()) {
case R.id.fadeBtn:
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
break;
case R.id.slideBtn:
overridePendingTransition(
android.R.anim.slide_in_left, android.R.anim.slide_out_right);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.