Fixed
Status Update
Comments
tr...@gmail.com <tr...@gmail.com> #3
Thanks for the report!
co...@google.com <co...@google.com>
sg...@google.com <sg...@google.com>
sg...@google.com <sg...@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> #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).
Description
Jetpack Compose version: 1.2.0-rc01 Jetpack Compose component used: CenterAlignedTopAppBar Kotlin version: 1.6.21
Description
A long title in a CenterAlignedTopAppBar overlaps the icons if their with is not identical on the left (navigation icon) and right (action icons) see screenshot.
Steps to Reproduce or Code Sample to Reproduce
Create a CenterAlignedTopAppBar with only a navigation icon and no action icons and a long title.
Since the TopAppBarLayout calculates the max width of the title by taking the full width of the bar, substracting the width of the nav icon and the action icons, but then centers it in the bar, it will overlap either the nav icon or the action icons - whichever of the both is wider.
Solution would be to take the max width of the navigation icon and the action icons and multiply it by 2 to have the same spacing on the left and right.