Skip to content

Instantly share code, notes, and snippets.

@ifucolo
Created February 24, 2017 00:38
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 ifucolo/4d77d0741be37b1cfea876a7f4905355 to your computer and use it in GitHub Desktop.
Save ifucolo/4d77d0741be37b1cfea876a7f4905355 to your computer and use it in GitHub Desktop.
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