Have you tried the all new shared element transition API 💫as a part of today's compose-animation 1.7.0-alpha07 release?
If you have any feedback/questions/demos, we would love to hear/answer/see them! 😊
Starting to learn about `Row`in
#JetpackCompose
? Here's an animation that could help illustrate how `Row`s behave when resized.
We might add something like this in the API reference soon! 😀
Inspired by:
Yup, LookaheadLayout is a new concept that we've been building. I can barely contain my excitement about the possibilities it opens up, shared element, auto-resizing, and more! 🤩🥰 Should be ready to release soon.
Spoiler: LookaheadLayout + movableContentOf = 🤯
Sneak peek: 👇
Introduce LookaheadLayout for Jetpack Compose.
This allows us to look ahead and calculate a new layout while allowing the actual measurement & placement of every frame to be different than the pre-calculation.
Morph animation, SharedElementTransition.
Animating content in and out of a container in
#JetpackCompose
has been made easy with the 🆕 `AnimatedContent`, coming in beta09 release! ✨
Here's sneak peek of what you can build with AnimatedContent using ~10 lines of animation code (Neo not included 😜):
What can you accomplish with 3 lines of animation code in
#JetpackCompose
⁉️ I'm glad you asked.... 😋😆
1⃣line (in a loop) for a spring chain
1⃣line for expanding/collapsing
1⃣line for icon rotation on click
Full source code:
📥Enter/Exit📤 Transition has just been made more powerful and fun in
#JetpackCompose
with the new `AnimatedVisibilityScope`. (🆕 in beta07.) 🤩
Children of `AnimatedVisibility` now can have their own enter/exit transition via convenient `Modifier.animateEnterExit`💫
Here's a sneak peek of a shared element transition demo that I recently built👇 in
#JetpackCompose
The new APIs will be released soon, along with sample code for building this demo.☺️ If you feel impatient, try it out in the latest snapshot build at:
Are you looking to add some spark to your app with animations? ✨🤩
We have a carefully designed
#JetpackCompose
animation code lab to give your learning curve just the right amount of `Easing`. 😛🤣
The new
#jetpackCompose
animation 1.1.0-alpha02 comes with a couple of highly requested features. See:
🆕 Scale Enter/ExitTransition for AnimatedVisibility/Content and Nav transition
🆕 StartOffset for repeatables ➡️ You can create this with ~20LOC: 👇
Ever wondered what you can animate with a one-liner in your
#JetpackCompose
code?🤩 Does that make you curious about what else you can do using the animation system?🧐 We have answers for you in our hot off the press animation tutorial:
How well does the new Compose shared element API handle text❓🧐
Well... I'll let you be the judge of that.😉
See 👇 for shared texts transforming the font size change
BTW, this is the default behavior for `shareBounds` in the latest androidX snapshots:
Check out the new `Animatable` API in
#JetpackCompose
that achieved this bounce-off-the-wall animation with <30 lines of animation code! (API available in compose alpha 10)
Code is here:
From the thrill of rendering the first rectangle (3+ years ago), to now celebrating the stable release, it's been an incredible journey!🤩 Seeing how Compose enables easy and even fun Android dev has made agonizing over little details, design & re-design totally worthwhile! 🥳🎉
#JetpackCompose
animation debugging just got more fun. 🥰 With the support for "Animator Duration Scale" you can inspect your compose animations in slo-mo. 🐌🐌
Thanks
@ppvi
for filing the feature request!
🔥💯🥰🥳
Super thrilled to see the new shared element API enable apps to add polish and delight. ♥️ Please feel free to tag me with the shared elements you build, 🤩 or ask me questions about the API.
With the current androidx SNAPSHOT builds that include shared element transition support and with androidx.navigation supporting in-app predictive back gesture animations , you can with very few lines of code get shared elements that are also animating as you are gesturing back!
compose-animation 1.1.0-alpha05 was released today! 🎉🎉
🙂Good news: Non-extension AnimatedVisibility APIs graduated from experimental
🙃Another news: There was one last round of API tweaks (parameter re-order only) on Enter/ExitTransition 🙇♀️
Animations are just so easy & fluid with
#JetpackCompose
You can do whatever you want. I made a collapsing TopBar that changes size with scrollOffset & it's smooth af. Twitter will probably butcher the frame rate so here's full res:
#AndroidDev
After seeing some demos with Shared Element Transactions, I wanted to give it a try with Recipe App and it turned out to be great. Also, the configuration was super easy.
#androiddev
#JetpackCompose
🤔🤔Thinking about building a modifier that animates size and position as a result of modifiers change:
Modifier.animateLayout(
if (condition) someModifiers else otherModifiers
).restOfModifierChain()
Would 👆be useful? If so, I'd love to see your use cases! ✨
The tooling for Compose animation is super cool. There's been some recent improvements on curves visualization. 🤩🥰
Another awesome new feature is the support for `AnimatedVisibility`. Woohoo! 🎉🎉
Definitely recommend check it out:
Cascading menu was one of the canonical use cases that AnimatedContent was designed for. It was a fun challenge to support size transform animation _while_ the content is changing (rather than after).
Glad to see it working out beautifully in this DropDown library. 😍
Glad to see folks playing with the API already! 🤩
LookaheadLayout is designed to be powerful and flexible rather than convenient, as it's a low level API. We are actively working on it and building convenient animation APIs on top of it. Stay tuned!✨✨
So you can achieve the shared element transition and auto-resizing animations with Compose UI 1.3.0-alpha01.
LookaheadLayout + movableContentWithReceiverOf = 🚀
We just deprecated scaleSharedContentToBounds. Instead, we introduced two ResizeModes: ScaleToBounds and RemeasureToBounds to make the choice more explicit in sharedBounds.👇
If you only use fade in sharedBounds, you may want to specify RemeasureToBounds to keep the behavior
🗞️A small update to Shared element APIs:
resizeMode parameter on Modifier.sharedBounds().
Allowing you to specify how the item should be resized between the two states.
More information:
#JetpackCompose
It was a pleasure to chat with
@FMuntenescu
about building
#JetpackCompose
animation system. Lots of fond memories rushed back.😊
It's also been inspiring 🤩 to see a constant stream of creativity from the community.🎉 Glad we were able to showcase some of the awesome animations.
Getting this ready for the official Android reference doc! Woohoo! 🥳
Is there anything else in
#JetpackCompose
you'd like to see an animated visualization of? 😀
Check out Orbitary! 🥳
The size and position animation APIs offered in Orbitary are very similar to what I imagined animations built on top of LookaheadLayout would look like.🤩👍 I'm super excited to see them released in a library!
Well done!👏🎉
Published a new open-source library, Orbitary.
🪐 Jetpack Compose animation library that allows you to implement animations such as shared element transition.
This is experimental and you can check how to modulate LookaheadLayout and examples.
@android_I_AM
@metehanbolatt
@JorgeCastilloPr
@mobiledev_pro
We are working on an official guide that will go into details on how to build shared elements, different use cases, and tips. Spoiler alert😉: it has a section about modifier order.
It should be released soon. Stay tuned!
👆 Wireframes indicate the layout bounds of the items calculated by the LookaheadLayout.
✨Each item is a movableContentOf, which made it possible to move them between a single column and a double-column layout without losing their animation states. 🤯
@chrisbanes
`AnimatedVisibility` is now available in compose animation library as a part of the compose dev17 release 😀:
Here's an example of using AnimatedVisibility for adding/removing items in a `LazyColumn`. (Demo code: )
Super thrilled to chat about the motivations and decisions that went into designing the
#jetpackCompose
animation and graphics system on ADB podcast with
@nadewad
. 😆✨
@crafty
and
@chethaase
were amazing hosts, as usual! 🎉
2 of my favourite topics in this next episode:
#JetpackCompose
Graphics & Animations (🤫 don't tell the other topics!)
@doris4lt
&
@nadewad
join us to discuss how these traditionally imperative systems work in this brave new declarative world.
[EN] We can write the codes as required and create a transition with a single Modifier function. The whole secret is only in shareBounds. You can get the demo with small touches on the code in the video. I would be happy if you could try it and share your ideas.
[TR] Olması
It's here! Jetpack Compose Beta 🥳
🚀 New animation APIs, accessibility, coroutines and arch components support.
🛠 New tools with layout inspector, animation preview, live literals, and interactive previews.
🎬 Watch the fun live at
#TheAndroidShow
Check out our ongoing effort on use case driven demos: 🎉🎉
Please let us know if there's any particular use case you'd like to see added to the collection. 👆
This was the statue last time I was in the office. Two thoughts: 1️⃣ The pandemic has lasted too long! 😤 2️⃣ We have accomplished so much during that time! 👏🤩
📸 Say Android! 📸
Join us for a virtual Android developer community group photo, and tag a friend to come along!
Where: Android 12 statue in the
#GoogleIO
Adventure
When: May 20th at 9:15 AM PT
Register for
#GoogleIO
to join us in Adventure →
#ComposeMultiplatform
will never reach 100% adoption in the platforms it targets
But it will enable many kotlin developers(🙋♂️) to build beautiful apps beyond Android and I am excited for that 🥳
thanks
@kotlin
team
Finished some charts demo in
#jetpackcompose
and using latest Animatable suspend animation api thanks to
@doris4lt
for that. To showcase the use of chart also integrated it to crypto app in cookbook. check it out at
#AndroidDev
@GakisStylianos
@midofnowhere02
There's a `placeHolderSize` param in `Modifier.sharedBounds` that you can configure to change the space that sharedBounds occupies in its parent layout. By default, the parent sees no change. If you set `placeHolderSize = animatedSize`, parent layout will animate to accommodate🔥
It was so much fun to hang out with
@seebrock3r
and
@hamen
, and chat about animations! Thanks for having me! ☺️
Highly recommend checking out
@codewiththeita
channel on both Twitch and Youtube. Lots of fun explorations in Compose.🤩🤩
We've had a lot of fun, and as usual, learnt a ton from our guest! Thanks a lot
@doris4lt
and everyone who participated 🙌
The recording is already available on Twitch, and we'll have it on our YouTube archive in 2 days. Don't forget to subscribe 🤗
Check out this video where
@mitch_tabian
walks you through building an infinite shimmer animation.
Really impressed with how well explained the animation and graphics concepts are! Well done, Mitch! 👏
Super excited about chatting with
@codewiththeita
tomorrow! 😀
If you have any questions about
#JetpackCompose
animations (APIs, roadmap, tips, etc), please let us know in the slido below👇
Imagine there was a new Animation API in
#JetpackCompose
, and imagine we wanted to chat about that with the Queen of Animations Doris Liu (
@doris4lt
).
Stop imagining it, join us tomorrow, and if you have questions, head here
#AndroidDev
#LearningTogether
@heyrikin
That's so great to hear! ♥️🥳
In case at some point you need a way to animate out the bottom bar in the overlay, consider
`Modifier.renderInSharedTransitionOverlay(). animateEnterExit(.., slideOutVertically(..))` 😉
Super excited about meeting everyone
@droidconBerlin
.🥳❤️
Is there anything particular that you are curious about on the topic of Advanced Layout Animations? If so, please let us know! 📣
I'll be (*hopefully) speaking at
@droidconBerlin
alongside my colleague
@doris4lt
about Advanced Layout Animations in Compose! I'll be giving out my latest creation android keyrings 🔑
#dcbln24
* say a prayer to the visa overlords for me 😁🤞
@heyrikin
lol How true!! The best time to take a vacation is after the build cut for the release, but before the release is out of the door. It's the "quiet period". 🤣
@fatih_grs
Thanks for your talk at Android Worldwide. I asked this question there but, what I mean is a website that developers put their compose animations there and we could get the code easily for different animations.
I didn't mean if compose supports Lottie or not.
Orbitary version 0.1.2 has been released!
🪐 Jetpack Compose animation library that allows you to implement animations, such as shared element transition.
Thank you
@doris4lt
for sharing your amazing insights for this release.
@viru1100
You didn't do anything wrong. I have a fix for that in code review right now.☺️ My test for the fix is basically what you did in the video, but done programmatically. 😸
Once the fix lands, you could try out the snapshot, or wait for the next alpha.
We would love to hear about your experience building animations, not just in Compose but on any platform! 🤩👇
Your past experience and pain points in building complex animations could help us design a happy path in the upcoming features for Compose animation.🙂
We have been working to enhance Compose animations (I'm excited!) and would love to hear what you think ✨
Want to participate in the user study for it between 5/31 - 6/3? 🤩
Sign up here 👇🏻
#JetpackCompose
#AndroidDev
@GakisStylianos
perhaps we could start a # sharedElementTips series together here, with bite sized tips in each short post. 😊
Would people find it helpful❓
PSA for the Compose devs playing around with the new `.sharedElement` modifier.
Do not do this
```
Box(Modifier.size(...).background(...).sharedElement(...))
```
Do this instead
```
Box(Modifier.sharedElement(...).size(...).background(...))
```
Don't ask me how I know 🥹
I get confused sometimes how to scale images in
#JetpackCompose
. Here is an animation of all the possible ContentScale options.
here is an article where I go over this and many more image loading options.
#AndroidDev
#kotlin
@ianhlake
@JorgeCastilloPr
@mikewolfson
@shakil807
@dorisliu
Yup. We intend for AnimatedContent to build on top of LookaheadLayout so that AnimatedContent supports shared element out of the box. AnimatedNavHost will get shared element as a result of being based on AnimatedContent.
A must-watch talk that shared all the thoughts that went into ShapeShifter, as well as its really cool path morphing algorithms. The tool makes creating AnimatedVectorDrawables a breeze.
Thank you Adriano, and everyone else who has been a part of the journey of helping
#JetpackCompose
get to Beta. Hopefully the ride wasn't too bumpy. 🤣 It was the numerous insightful feedback from the Android community that enabled us to continuously improve Compose. 🙏🥰🎉
Reading through the animation docs of
#JetpackCompose
makes me happy :) for me personally, it was totally worth changing those APIs last minute, especially making transitions is much more intuitive for me now.
@fornewid
Thanks! 🙂
Navigation transition is one of the major use cases that AnimatedContent is designed for. There's still some work remaining before AnimatedContent can be used with navigation. Stay tuned!
Want to have your work used by millions of developers, and seen by billions of users?🤩 Want to work with an awesome manager and great co-workers?🔥
We have a job opening on Android Toolkit/Text team (in Mountain View)! 👇👇
I built this
@materialdesign
Multi-Action Floating Action Button in Jetpack Compose, utilising some of the new Transition API 🙌 I wrote up a deep-dive into how this was built, here 👉
#AndroidDev
#GDE
#JetpackCompose
Yes, it's important to check for CancellationExceptions if you need to ensure an animation has finished successfully. The default interruption behavior for animations in coroutine is to throw a CancellationException and therefore cancel the subsequent work.
Friendly reminder that with Compose animation APIs using Coroutines it's important to check for CancellationExceptions if you're relying on the animation to run!
Bottom Sheets, Drawers and all swipeable components fall into that category too :)
#JetpackCompose
@theapache64
This is one of the critical pieces for shared element. I'm currently building another essential piece for shared element in layout. Hopefully when this is all finished, your code snippet above would produce an animation with a couple of lines added. 😀
@JorgeCastilloPr
I'm experimenting with supporting shared elements in AnimatedContent leveraging lookahead:
http://aosp/2499518
We'll likely need to build the capability to render content in overlay as a prerequisite. Compose Navigation will get the shared element from AnimatedContent. 🙂
Super insightful and informative talk by
@queencodemonkey
on Compose animation. ❤️👏🔥 Loved the comparison between Compose and View, on the APIs and also on the mental model!
PSA
#2
We made both Modifier.approachLayout and ApproachLayoutModifierNode stable🥳, with one last change to them🙃:
isMeasureApproachComplete has been changed to `isMeasureApproachInProgress`, same for placement
If you use approachLayout, please make sure to negate the lambda
@theRyanSimon
There are more demos in the code base:
ComposeCookbook from
@_gurupreet
: , samples from our team: and
@vinaygaba
's are all wonderful materials to learn compose 😃
Great article on LookaheadLayout!👏🤩 The concept of intermediate layouts is very well explained and illustrated! 🔥🥰
P.S. Google Translate works amazingly well in translating tech blogs 😉
@metehanbolatt
@JorgeCastilloPr
@mobiledev_pro
The order of modifiers definitely matter. 🙂 The rule of thumb is to put what's shared between two shared elements/bounds *after* the sharedFoo modifiers, such as shape, border, etc, and what's not shared before the sharedFoo modifier (e.g, padding, etc)
@ychescale9
Looking great! 🔥👏🤩
Thanks for sharing the initial impressions! 🙏
On a related note, we are exploring potentially providing a global SharedTransitionScope. Though there's non-trivial amount of prerequisite work. Stay tuned!
PSA
#1
We changed the default enter/exit for `Modifier.sharedBounds` from fade to fade + dynamically scale
If you built shared elements using snapshot builds, you may see some behavior change/improvement. Changing enter/exit to fadeIn/Out will restore the previous behavior.
Implemented animations while navigating between screens in my
#JetpackCompose
sample app
#Adopty
using "accompanist-navigation-animation" library.
Navigation animation library is great. Fun and easy.
#AndroidDev
😃 Easier Android UI with Jetpack Compose
Join
@crafty
as he dives into
#JetpackCompose
examples showcasing Dynamic Theming, the modifier system, and more!
#11WeeksOfAndroid
Watch →
In Jetpack Compose Animation, we have AnimationSpec with Easing (like interpolator). To understand their behavior, I have created an App that plots them into graphs as an example shown below. Checkout
#JetpackCompose
#AndroidDev
@_gurupreet
Compose cookbook has inspired both the Android community and folks working on Compose with the variety of use cases it presents elegantly!🥰🤩 Thank you for the amazing work! It's been truly inspiring! 🔥🎇🎆
Woohoo, my chat with
@codewiththeita
on LookaheadLayout is out now on Youtube: !🔥🔥 Check it out and let me know if any of the ongoing explorations I shared is useful for you!
Thank you
@codewiththeita
for being awesome hosts! 🙏
VOD TIME!! 🎊
Our latest episode with Doris Liu (
@doris4lt
) about animations with
#JetpackCompose
is live!
Check out the video
Join the giveaway:
1. Subscribe 🔔
2. Like 👍
3. Comment with "LookAheadLayout"
WIN A FREE TICKET FOR
@droidconNYC
! 🤑🎟️
@Snokbert
Looking very nice already! 😻👏 By the time sharedBounds API is officially released, your app is probably ready to ship with shared elements already. 🥳
Let me know if you run into any issues using movable content.
@queencodemonkey
@Android
Aww.. Thank you Huyen! I'm super flattered!😊🤗 Hopefully everything that went into the APIs would bring a little delight to people using them. 😁
@ppvi
Haha, landing soon indeed, but not yet due to a small increase in memory usage from wiring up with ContentResolver to read settings. 🙃
Good news is because we don't rely on new framework APIs for duration scale, this will be available for all API levels that support Compose.😆