The latest development version of compose (1.6.0-dev1383) has completely broken my layouts. The default line spacing of multiline text has been drastically increased. Is this by design or is this a bug?
k
Konstantin Tskhovrebov
01/23/2024, 10:38 AM
@Ivan Matkov
m
Michael Paus
01/23/2024, 10:46 AM
Difference between
1.6.0-dev1369
and
1.6.0-dev1383
from left to right:
i
Ivan Matkov
01/23/2024, 10:54 AM
> Is this by design or is this a bug?
Kind of by design. This change was picked up from Google's upstream.
I did investigation of the cause and it was behaviour change in Android's 1.6.0-alpha01. To mitigate it, line height was explicitly specified in
Many thanks for the quick response. I’ll have to investigate now in how many places I’ll have to apply these changes in my code to get the old layout back again.
The release notes documentation has been edited to clarify this change in behavior for line height.
To support non-standard text sizes, we encourage users to follow the Material design system and use a different type scale rather than changing the font size directly. Alternatively, users can overwrite the line height like so: