sindrenm
01/03/2024, 11:03 PMLargeTopAppBar
when it's collapsed (first image), but not when it's expanded? Material 3 guidelines prohibit multi-line small app bar texts (understandable), but allows them for large ones (second image), but I would like to transition between the two on scroll (video).sindrenm
01/03/2024, 11:06 PMLargeAppBar
docs set maxLines = 1
in their example, but that would ellipsize the text in the expanded version, too.
https://developer.android.com/jetpack/compose/components/app-bars#largesindrenm
01/03/2024, 11:22 PMval behavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior()
val maxLines = if (behavior.state.collapsedFraction > .7f) 1 else 2
The start and end results are like I want them to be, but because the two texts are at some point visible at the same time during the transition, it does look a little wonky. If anyone knows anything better, then I'd love to hear it.ascii
01/04/2024, 12:17 AMsindrenm
01/04/2024, 8:13 AMascii
01/04/2024, 9:02 AMsindrenm
01/05/2024, 12:34 PM