Skip to content

Instantly share code, notes, and snippets.

@rezaiyan
Last active September 18, 2017 10:22
Show Gist options
  • Save rezaiyan/9ae8a84f5b7a787da88522da71593a9f to your computer and use it in GitHub Desktop.
Save rezaiyan/9ae8a84f5b7a787da88522da71593a9f to your computer and use it in GitHub Desktop.
View transaction
//Start View
Intent intent = new Intent(context, SearchActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ActivityOptions options = ActivityOptions.
makeSceneTransitionAnimation(getActivity(), v, "transition");
startActivity(intent, options.toBundle());
}else
startActivity(intent);
//End View
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
searchInput.setTransitionName("transition");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment