Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
an...@google.com <an...@google.com>
lp...@google.com <lp...@google.com> #3
Thanks for the report!
al...@gmail.com <al...@gmail.com> #4
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 style = LocalTextStyle.current.copy(lineHeight = TextUnit.Unspecified)
, or create a custom Typography
entirely.
ch...@google.com <ch...@google.com> #5
deleted
ap...@google.com <ap...@google.com> #6
In my case, I have multiple font sizes in the same Text
(using SpanStyle
in AnnotatedString
). There are legitimate reasons for this. For example, when combining Chinese and English (phonetic) together (for language-learning purposes).
lp...@google.com <lp...@google.com>
al...@gmail.com <al...@gmail.com> #7
Woot thanks Louis!
Description
Inhttps://github.com/material-components/material-components-android/blob/89a1bf883fa614702bb43d2cfa75a38005a42421/lib/java/com/google/android/material/internal/ViewUtils.java#L259-L271
material-components-android
, views automatically inherit the elevation of their parentViewGroup
s using this utility method:For example, say you have a
MaterialButton
(with 4dp elevation) contained inside of aBottomSheet
(with 16dp elevation). In dark theme, theMaterialButton
will inherit theBottomSheet
's elevation, meaning that its elevation overlay will render as if theMaterialButton
had 20dp elevation instead of 4dp elevation.It would be useful if there was a builtin mechanism to support this in Compose. This would make it easier to migrate UIs written with material-components-android to Compose while still maintaining UI consistency.