Zoltan Demant
03/05/2024, 9:18 AM@Composable () -> Unit
without changing the signautre, and without wrapping the composable in another layout?Alexander Zhirkevich
03/05/2024, 9:20 AMZoltan Demant
03/05/2024, 9:22 AMAlexander Zhirkevich
03/05/2024, 9:23 AMZoltan Demant
03/05/2024, 9:25 AMgildor
03/05/2024, 9:34 AMgildor
03/05/2024, 9:34 AMZoltan Demant
03/05/2024, 9:38 AMStylianos Gakis
03/05/2024, 12:12 PMcontentPadding: PaddingValues
instead of just applying a padding modifier, so again this didn’t work well for me 😄Zoltan Demant
03/05/2024, 12:38 PM@Composable () -> Unit
is for a label inside a bunch of my components like button, chips, etc. Now Id like for them to animate their size whenever the text changes. I can wrap the label in a box with the modifier, but that doesnt get me the results I want, adding it directly to the label does. Im prepared to go pretty far to avoid having to specify the modifier in each call site, Id even prefer doing it the box way even if the text is a bit cut off during the animation.Stylianos Gakis
03/05/2024, 12:40 PMAnimatedVisibility(
visible = isExpanded,
enter = fadeIn() + expandVertically(clip = false, expandFrom = Alignment.Top),
exit = fadeOut() + shrinkVertically(clip = false, shrinkTowards = Alignment.Top), // Or Alignment.CenterHorizontally or something like that if you want the animation to happen from the center our. Use the preview animation tooling to see the animation play out frame by frame
)
To do the animation without clipping?Zoltan Demant
03/05/2024, 12:59 PMStylianos Gakis
03/05/2024, 1:10 PMZach Klippenstein (he/him) [MOD]
03/05/2024, 3:01 PMStylianos Gakis
03/05/2024, 3:03 PMStylianos Gakis
03/05/2024, 3:04 PMZach Klippenstein (he/him) [MOD]
03/05/2024, 3:11 PMZach Klippenstein (he/him) [MOD]
03/05/2024, 3:12 PMStylianos Gakis
03/05/2024, 3:28 PM