-
-
Save codingwithsara/8c31adcc6222c63fa6db9c41e597557d to your computer and use it in GitHub Desktop.
Activity Animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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