Last active
August 17, 2017 17:57
-
-
Save shubham08gupta/4619f40493d4beca0cc2b86630dfd1fe to your computer and use it in GitHub Desktop.
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) { | |
if (v instanceof Button) { | |
ImageView circleImage = (ImageView) findViewById(R.id.iv_circle); | |
Intent intent = new Intent(AnimationActivity.this,ImageDetailActivity.class); | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
startActivity(intent, | |
ActivityOptions.makeSceneTransitionAnimation( | |
this, | |
new Pair<View, String>(circleImage, | |
ViewCompat.getTransitionName(circleImage))) | |
.toBundle()); | |
} else { | |
startActivity(intent); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment