Status Update
Comments
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #3
Thanks for the report!
ma...@google.com <ma...@google.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.
pr...@google.com <pr...@google.com> #5
od...@gmail.com <od...@gmail.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).
da...@mullvad.net <da...@mullvad.net> #7
Can verify this issue is still not fixed in latest Material3 version 1.2.0. Workaround addresses the issue but creates a new issue with the trailing padding being to large as stated by
Description
I was trying to use the
ListItem
composable from material3 and noticed a couple of issues withtrailingContent
leaving more space than expected at the end.First issue
After checking the specs , I believe that
ListItemEndPadding
is set to the wrong value. It should be16.dp
not24.dp
.Second issue
If, for example, I try to recreate the "One-line lists" and use a
CheckBox
in the trailing content lambda,ListItem
will add a16.dp**
padding to the end. Unfortunately, a clickableCheckBox
usesminimumInteractiveComponentSize()
, and the reserved space will increase from24.dp
(CheckBox size) to48.dp
, adding12.dp
to the already existing16.dp
fromListItem
.Right now I think it's not possible to recreate the examples from the specs that have a "Secondary Action area" like a
CheckBox
,IconButton
, or anything small with a minimum touch target size added. Text "100+" examples are different since they don't need to be clickable.Steps to reproduce
Run a composable with this content:
Instead of 16.dp, we get:
Apologies if this is working as expected. All the
ListItem
examples useText
as thetrailingContent
and I think an example withCheckBox/IconButton
could be very helpful, because I don't see what the correct approach is when using other types of content. Thank you.