Skip to content

Instantly share code, notes, and snippets.

@PhongHuynh93
Created July 4, 2021 07:45
Show Gist options
  • Save PhongHuynh93/f4306a409304c6862cf9de77fa00311d to your computer and use it in GitHub Desktop.
Save PhongHuynh93/f4306a409304c6862cf9de77fa00311d to your computer and use it in GitHub Desktop.
MaterialContainerTransform
@Override
public void onTransitionEnd(@NonNull Transition transition) {
removeListener(this);
if (holdAtEndEnabled) {
// Keep drawable showing and views hidden (useful for Activity return transitions)
return;
}
// Show the actual views at the end of the transition
startView.setAlpha(1);
endView.setAlpha(1);
// Remove the transition drawable from the root ViewOverlay
ViewUtils.getOverlay(drawingView).remove(transitionDrawable);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment