Fixed
Status Update
Comments
co...@google.com <co...@google.com>
ap...@google.com <ap...@google.com> #3
Thanks for the report!
ma...@google.com <ma...@google.com>
st...@gmail.com <st...@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.
pr...@google.com <pr...@google.com> #5
deleted
Description
Jetpack Compose version: (BOM)
2024.06.00
Material Library Version: have only tested with M3
Material Compose component used:
SingleChoiceSegmentedButtonRow
Android Studio Build:
Build #AI-241.18034.62.2411.12169540, built on August 1, 2024
Kotlin version:
2.0.0
Code Sample to Reproduce:
For large font scales, the
SegmentedButton
s in the sample above show text truncation (see attachments). To increase the range of font scales for which truncation is not needed, I would like to be able to reduce the horizontal padding forSegmentedButton
. However, that is not possible; 12dp of padding is hard-coded into the library-private ComposableSegmentedButtonContent
. So, to reduce padding with the current APIs, I would need to:SingleChoiceSegmentedButtonRowScope.SegmentedButton
, which requires that ISegmentedButtonContent
, which requires that IOutlinedSegmentedButtonTokens.LabelTextFont
andSegmentedButtonContentMeasurePolicy
, which requires that ISegmentedButton.IconSpacing
andMotionTokens.DurationMedium3
.It would be helpful if
SegmentedButton
's API allowed simpler editing (or removal) of the hard-coded minimum horizontal padding.Separately, it would be helpful in general if the Material libraries didn't make so many APIs internal/private, as doing so hinders our ability to make small edits to Material components while benefiting from future updates to the library code.
Thank you for reading and considering this!