Osanosa
05/08/2024, 10:46 AMjava.lang.IllegalArgumentException: layouts are not part of the same hierarchy
I have a card with an image and a Dialog with the same image. I want to make a smooth transition between them.
Basic structure is:
SharedTransitionLayout{
Column{
...
AsyncImage(modifier = Modifier.sharedElementWithCallerManagedVisibility(
sharedContentState =rememberSharedContentState(key = order.id!!),
visible = true
))
if (boolean){
Dialog{
AsyncImage(modifier = Modifier.sharedElementWithCallerManagedVisibility(
sharedContentState =rememberSharedContentState(key = order.id!!),
visible = true
))
}
}
}
}
I also tried wrapping it inside animatedVisibility instead of if block and still same issue, how do I make it work?Tolriq
05/08/2024, 11:16 AMOsanosa
05/08/2024, 12:03 PMTolriq
05/08/2024, 12:12 PMOsanosa
05/08/2024, 12:13 PMDoris Liu
05/08/2024, 9:26 PMandrew
05/08/2024, 10:39 PMDoris Liu
05/08/2024, 11:17 PM