<https://github.com/androidx/androidx/commit/c5f36...
# compose
c
Wow @Doris Liu this looks awesome! Need some time to check it out... but I can't wait to create some simple animations from a LazyList list item expanding into the next screen!
❤️ 1
d
Please give us feedback once you give it a go after it's released! 🙂
t
Will there be more docs / example before release ? Especially around the different kind of transition in the same global container.
d
The release will include a bunch of samples and docs. Re: different kinds of transition, Curious, what specific kinds of transition do you have in mind? Also cc @Rebecca Franks
t
When you started to work on that and asked for what kind of transition I told you about the youtube music one. A small image in a compact player that moves to another position when the player expands. There's a whole container in a bottomsheet, A row with the image in the compact player that scroll off while the sheet expand and the big image is inside a pager as users can swipe left / right making this hard to achieve with standard things. I guess by making the images disappear / appear I could trigger the transition, but would it be possible to control the animation and tie it to the bottomsheet expanding when the user manually drag it?
d
The music player transition is a very bespoke transition. It could work with shared element transition with SeekableTransition (we recently added some
SeekableTransitionState
APIs). You'll need to seek based on the gesture, and animate to target once you let go.
t
Thanks, let's hope there's a few pieces about that in the future samples and doc then.
1
k
@Doris Liu It looks like this is based on
AnimatedContent
. Is it somehow possible for a list item to appear detached from the list and appear as a dialog with the list still being visible in the background?
Maybe that would rather be a plain lookahead thing 🤔
d
Yes. The shared elements can work with AnimatedVisibility too. So you could have two `AnimatedVisibility`s: one for the item, the other for the dialog content. The item could disappear from one AV and appear in another. I happen to have an example for doing something similar: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]imation/demos/sharedelement/SharedTransitionScopeDemo.kt;l=90
The tricky part about a dialog is that it's a new window. It may not be straightforward to query and manage position changes. Or may be you are talking about a Dialog-like UI element that is not in a new window?
k
Dialog-like, yes, not a real dialog. Awesome, thanks!
sealed interface AnimatedContentScope : AnimatedVisibilityScope
TIL 😀
🦜 2