Fixed
Status Update
Comments
se...@google.com <se...@google.com>
sg...@google.com <sg...@google.com>
sa...@gmail.com <sa...@gmail.com> #3
Thanks for the report!
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.
bo...@gmail.com <bo...@gmail.com> #5
deleted
sg...@google.com <sg...@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 component used: TopAppBar
The Material3 spec says the TopAppBar height must always be 64dp and this is enforced in the library, but sometimes it's just too big, and one good example of this is in landscape mode where vertical space is at at a premium.
Factoring in the system bars, 64dp is around 20% of the available vertical space in landscape mode on typical phones. There's even less space if an app uses a bottom navigation bar. The Play Store app is a good example that even first party apps are affected by this. In landscape mode, there is only space for a single row of app icons when browsing apps on the Play Store.
There is currently no standard pattern to add anything more to the TopAppBar in Landscape mode than a navigation icon, title and action icon buttons which are there in portrait. This means that the extra horizontal space in landscape mode ends up unused.
It would be great if we could have some more control over the TopAppBar height, to make it smaller than 64.dp. Due to the minimum touch target size of 48dp, I've used a 48dp height TopAppBar in my app which I'm quite happy with.
In portrait mode too, having a 56dp height TopAppBar allows for a slightly more compact layout on devices with smaller screens.
Thanks!