Created
February 24, 2017 00:38
-
-
Save ifucolo/4d77d0741be37b1cfea876a7f4905355 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
private void transition(View view, String url, String id) { | |
Intent intent = new Intent(this, ZoomPichActivity.class); | |
intent.putExtra("url", url); | |
intent.putExtra("id", id); | |
ViewCompat.setTransitionName(view, id); | |
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, view, id); | |
startActivity(intent, options.toBundle()); | |
} | |
@OnClick(R.id.photoOne) | |
public void onClickPhotoOne(){ | |
transition(photoOne, getString(R.string.img_url), getString(R.string.transition)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment