bryankeltonadams
09/28/2023, 8:34 PMenterTransition = { EnterTransition.None },
exitTransition = { ExitTransition.None }
like is mentioned in the https://developer.android.com/jetpack/compose/animation/quick-guide#animate-whilst docs.
Has anyone ran into having bugs or issues with this? I wanted to start having some of my screens slide up and down when navigating to and exiting from, but I'm getting some really weird animations on screens I'm not touching at all.
not kotlin but kotlin coloredbryankeltonadams
09/28/2023, 8:35 PMIan Lake
09/28/2023, 8:47 PMAnimatedContent
which does do a size transform when your content doesn't fill the size completely in the first composition (e.g., you wait for data to be loaded before displaying anything). There were some bug fixes around this in the Compose 1.6 alphas - does this magically fix itself if you upgrade your Compose version?Kevin Worth
10/02/2023, 8:48 PMColumn
and I was not setting it to fillMaxSize
, so as @Ian Lake points out, it was first a very small thing and then it got moved into position at the top. After changing it to use fillMaxSize
, I saw more pleasing behavior where the text I expected to see at the top started at the top because it started as a large thing from the beginning. Hopefully that makes sense and is helpful, even if it doesn’t answer the question of how to disable the animation altogether 🤷 . At least if we can’t disable it, we can make it look good/natural.bryankeltonadams
10/02/2023, 9:39 PMIan Lake
10/02/2023, 9:41 PMAnimatedContent
and hence your Compose version that is doing all of the animations you're seeingbryankeltonadams
10/03/2023, 4:12 PMIan Lake
10/03/2023, 4:14 PMbryankeltonadams
10/03/2023, 4:19 PMKevin Worth
10/03/2023, 4:31 PMisClickable
at the level of my LazyColumn:
var isClickable by remember { mutableStateOf(true) }
LazyColumn {
items(data, key = { it.id }) {
ItemRow(
...
isClickable = isClickable,
onClick = { clicked ->
isClickable = false
onClickWeatherPlace(clicked)
},
)
}
}
But should I really have to go through all of this?
Plus, I could have any number of clickable things on screen, not just these rows of data, so now I have to bubble up a boolean (something like isNavigating
, or allowClicks
) and then disable everything that is clickable? Something doesn’t feel right. Maybe I’m missing something silly?Kevin Worth
10/03/2023, 4:33 PMIan Lake
10/03/2023, 4:35 PMbryankeltonadams
10/03/2023, 5:05 PMbryankeltonadams
10/03/2023, 5:06 PMbryankeltonadams
10/03/2023, 5:10 PM