Skip to content

Instantly share code, notes, and snippets.

@Kvest
Last active October 25, 2016 17:06
Show Gist options
  • Save Kvest/d3c8dd5c827fc63147fff2d45e51f12a to your computer and use it in GitHub Desktop.
Save Kvest/d3c8dd5c827fc63147fff2d45e51f12a to your computer and use it in GitHub Desktop.
Intent = new Intent(...);
...
//Shared transitions available only from Lollipop
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
//grab properties for custom transitions
Bundle nameExtra = new Bundle();
TextColorTransition.addExtraProperties(nameView, nameExtra);
intent.putExtra(transitionName, nameExtra);
Bundle frameExtra = new Bundle();
RingViewTransition.addExtraProperties(frame, frameExtra);
intent.putExtra(transitionFrame, frameExtra);
}
startActivity(intent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment