https://kotlinlang.org logo
#compose
Title
# compose
t

Tolriq

06/25/2022, 8:25 AM
Is there some documentation about dynamic size layout more advanced than just the BoxWithConstraint? Typically I'd like to take in account the system font zoom to be able to decide what to show or not, or update the font size or layout accordingly.
j

Jessica Ernst

06/25/2022, 8:29 AM
you mean responsive or adaptive layouts? yes there is https://developer.android.com/jetpack/compose/layouts/adaptive
t

Tolriq

06/25/2022, 8:30 AM
Well this is the generic one about WindowSize and BoxWithContraint to check in dp.
For some part I need to go more precise. Like in a normal 300.dp all fit it but if the user have zoomed it's font to max in OS settings it no more fits and I want to hide a part in that case, not change the font size.
j

Jessica Ernst

06/25/2022, 8:35 AM
ah okay with how to handle if os settings are destroying the ui. Okay no I don’t know never thought about it to be honest. But now Iwould be interested too. But I don’t think that the documentations go far enough for that. But maybe someone had a case like that.
would be interesting
t

Tolriq

06/25/2022, 8:36 AM
I did not thought about it either but the app have options for the users to add things in a screen. Then zoom their font to the max then complains that not all fit 😛 So I'd like to find an efficient way to handle those "nice" users.
j

Jessica Ernst

06/25/2022, 8:39 AM
who doesn’t love such nice users 😜
but is there maybe a way to get the information if the user set a different font size in the os?
that’s what I would thinking about to handle your case
t

Tolriq

06/25/2022, 9:04 AM
There is but it's really ugly to handle after, I need to hardcode the Text styles in the calculations there's no more dynamic things. What I'd need is more a way to easily have every child measured , see it does not fit and react, but I'm having trouble finding proper documentation on how to do this efficiently.
5 Views