Closed riggaroo closed 3 months ago
Will values be added to the 'element' tab later, or is it normal for it to be empty. In my opinion, it would be convenient for debugging to display the values applied to parameters other than the key in sharedContentState.
Adding shared elements between Home feed and SnackDetail.
Introduced
SnackSharedElementKey
to create a unique key for the shared element to match.Using
Modifier.sharedBounds()
on the Card container, andModifier.sharedElement()
on the Image.Using
Modifier.sharedBounds()
withModifier.animateEnterExit()
on Text.The above modifiers require being in an
AnimatedVisibilityScope
andSharedTransitionScope
, in order to use the correct scope at the correct point, we save the scopes in a CompositionLocal and retrieve it when required.https://github.com/android/compose-samples/assets/9973046/2d0cf1d9-4ef2-4051-a2e9-b3255d45ac78