Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created July 18, 2019 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingwithsara/8c31adcc6222c63fa6db9c41e597557d to your computer and use it in GitHub Desktop.
Save codingwithsara/8c31adcc6222c63fa6db9c41e597557d to your computer and use it in GitHub Desktop.
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