Skip to content

Instantly share code, notes, and snippets.

@andremion
Created July 18, 2017 09:22
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 andremion/d4889255c9ff1bd63cb130b1ff9c666a to your computer and use it in GitHub Desktop.
Save andremion/d4889255c9ff1bd63cb130b1ff9c666a to your computer and use it in GitHub Desktop.
getActivity().getWindow().getSharedElementExitTransition().addListener(new TransitionCallback() {
@Override
public void onTransitionEnd(Transition transition) {
removeCallback();
}
private void removeCallback() {
if (getActivity() != null) {
getActivity().getWindow().getSharedElementExitTransition().removeListener(this);
getActivity().setExitSharedElementCallback((SharedElementCallback) null);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment