Skip to content

Instantly share code, notes, and snippets.

@PhongHuynh93
Created July 4, 2021 08:38
Show Gist options
  • Save PhongHuynh93/cb85ee86c46d51364caf6ffb5bcd2110 to your computer and use it in GitHub Desktop.
Save PhongHuynh93/cb85ee86c46d51364caf6ffb5bcd2110 to your computer and use it in GitHub Desktop.
transition
val targetFrag = ArtistDetailFragment.newInstance(it.artist, it.view.transitionName, it.view.width, it.view.height, it.imageUrl).apply {
sharedElementEnterTransition = MaterialContainerTransform()
}
supportFragmentManager.commit(true) {
addSharedElement(it.view, it.view.transitionName)
replace(R.id.content, targetFrag)
addToBackStack(null)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment