Zoltan Demant
12/13/2021, 5:50 PMCasey Brooks
12/13/2021, 5:52 PMrememberCoroutineScope()? That scope by default runs on Dispatchers.Main.immediate, so any long-running work on it would block UI rendering and event dispatching, and it should be moved to another dispatcherZoltan Demant
12/13/2021, 6:21 PMDispatchers.Default/IO (and I just verified thats the case).Rick Regan
12/14/2021, 1:59 AMCrossfade on Android 12, though that doesn't sound like it's related to your problem: https://issuetracker.google.com/u/1/issues/207107680Zoltan Demant
12/14/2021, 5:35 AMCrossfade a lot. Is this local to Crossfade only, or does a similar thing happen with AnimatedContent for you as well?Rick Regan
12/14/2021, 12:04 PMCrossfade is the only animation I (explicitly) use.Zoltan Demant
12/14/2021, 12:15 PMAnimatedContent, so thats a good sign! Thank you so much for bringing this to my attention. Im still seeing some lag on Android 12, but I think thats internal components using the broken animations, likely the same thing that Crossfade uses.Rick Regan
12/14/2021, 12:31 PMAnimatedContent?Zoltan Demant
12/14/2021, 12:34 PMRick Regan
12/14/2021, 12:35 PMRick Regan
12/14/2021, 12:37 PMZoltan Demant
12/14/2021, 12:43 PMRick Regan
12/14/2021, 1:12 PMCrossfade. (Although the doc page I am looking at calls it "experimental".) I will try it out.Zoltan Demant
12/14/2021, 1:23 PMCrossfade like an AnimatedContent that just uses fadeIn and fadeOut.Rick Regan
12/14/2021, 1:49 PMAnimatedContent made the example in my issue much slower (both API 31 and 30). Although, I'm not 100% sure I'm comparing them correctly (for Crossfade I used animationSpec = tween(10) and for AnimatedContent I used
transitionSpec = {
fadeIn(animationSpec = tween(5)) with
fadeOut(animationSpec = tween(5))
},
(the low tween times was just to factor that out of the issue.)Zoltan Demant
12/14/2021, 2:25 PMText? Ive noticed that buttons do something when animating their enabled/disabled state, Im curious if something in there is related to this as well.Rick Regan
12/14/2021, 2:44 PMCrossfade and AnimatedContent, with AnimatedContent still slower).Zoltan Demant
12/14/2021, 3:18 PMRick Regan
12/14/2021, 3:54 PMCrossfade version I had, yes, and I saw it there too.Doris Liu
12/14/2021, 10:12 PMAnimatedContent with
slideIntoContainer(AnimatedContentScope.SlideDirection.Left) with slideOutOfContainer(AnimatedContentScope.SlideDirection.Left)
instead of fade? That might help narrow down the issue here.Rick Regan
12/14/2021, 11:44 PM