What is the best way to debug “Shared element tran...
# compose-android
a
What is the best way to debug “Shared element transitions with navigation-compose” (https://developer.android.com/develop/ui/compose/animation/shared-elements/navigation) ? The list --> detail (hero) animation works smoothly, but going backwards from hero -> list shows a slight jump in the first few frames.
Per the docs, I was careful to keep modifier order identical, no differences in source/target padding, etc. Since there are viewmodel involved things are not previewable so I don’t think Android Studio can help … please correct me if i am wrong
s
Would be good to show a video of what you are experiencing. My completely random guess is that your first screen state isn't what it should be, perhaps there's one frame of a "loading" state or something. But again, a video would help a lot here.
1
a
Ok thanks, I will slow animation down and try to capture this. I noticed JetSnack uses nested NavHosts for these animations: The outer navhost containing an inner navhost. I was trying to avoid that, and wondering when it was strictly required. It was the only piece/key missing from the otherwise excellent docs
@Stylianos Gakis seems like the source and target had different aspect ratios. Thanks