Status Update
Comments
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #3
Thanks for the report!
ju...@google.com <ju...@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.
jb...@physitrack.com <jb...@physitrack.com> #5
ra...@gmail.com <ra...@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).
ma...@google.com <ma...@google.com> #7
@NavigationBar
should be able to support text of any size, so long as the component is allowed to grow in height. See the attachment for an even more extreme example.
@
jb...@physitrack.com <jb...@physitrack.com> #8
I am using basic Scaffold
and NavigationBar
as below:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MyApplicationTheme {
Scaffold(
bottomBar = {
NavigationBar {
items.forEach { item ->
NavigationBarItem(
selected = false,
onClick = {},
icon = {
Icon(
painter = rememberVectorPainter(image = item.icon),
contentDescription = null
)
},
label = {
Text(text = item.text)
}
)
}
}
}
) { paddingValues ->
Text(
modifier = Modifier.padding(paddingValues),
text = "Scaffold content"
)
}
}
}
}
private val items = listOf(
MenuItem.Home,
MenuItem.Share,
MenuItem.Results,
MenuItem.Messages,
MenuItem.Settings
)
private sealed interface MenuItem {
val icon: ImageVector
val text: String
object Home : MenuItem {
override val icon = Icons.Filled.Home
override val text: String = "Home"
}
object Share : MenuItem {
override val icon = Icons.Filled.Share
override val text = "Share"
}
object Results : MenuItem {
override val icon = Icons.Filled.Face
override val text = "Your results"
}
object Messages : MenuItem {
override val icon = Icons.Filled.MailOutline
override val text = "Messages"
}
object Settings : MenuItem {
override val icon = Icons.Filled.Settings
override val text = "App preferences"
}
}
}
And it does not work as expected as on device as Samsung S21 it looks bad, please find the screenshot:
ma...@google.com <ma...@google.com> #9
Can you check what version of the Material 3 library you are using?
jb...@physitrack.com <jb...@physitrack.com> #10
We use BOM 2023.09.00 version at the moment.
ra...@gmail.com <ra...@gmail.com> #11
In the following shared activity class(BottomNavigationActivity), I've used BottomNavigation and BottomNavigationItem to recreate the Google Photos design for my test application. However, when I increase the system-level text size on an Android device, the text enlarges following
Compose component versions details
implementation("androidx.compose.ui:ui:1.5.1")
implementation("androidx.compose.material:material:1.5.1")
implementation("androidx.activity:activity-compose:1.7.2")
implementation("androidx.navigation:navigation-compose:2.7.2")
ma...@google.com <ma...@google.com> #12
@androidx.compose.material3:material3:1.1.1
, which as you can see from 1.2.0-alpha02
or later to receive the fix.
@
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit 8375b55147af0816e487760dbf8e0469ffce7702
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Sep 28 19:39:36 2023
Auto-increase height of nav item for large content
The fixed height constraint is now a default-min-height constraint.
For one-line labels at the default font size, this is a no-op,
but this should better support multi-line labels and large font
sizes.
Fixes:
Test: added new unit test
Change-Id: Ic1896f470389d764159e0ce6e3a2483c190c4ecc
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/BottomNavigationTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BottomNavigation.kt
ra...@gmail.com <ra...@gmail.com> #14
Thank you for your response and for making the changes to Material 2 for this.
However, I attempted to implement the Material 3 NavigationBar instead of BottomNavigation but the outcome remained largely unchanged. I've included a screenshot and the relevant code for your reference.
ma...@google.com <ma...@google.com> #15
Can you double-check your material3
library version? The library is versioned differently than the material
library. I am not able to reproduce the issue with the latest material3
version.
ra...@gmail.com <ra...@gmail.com> #16
Here is how my libs.versions.toml looks alike
material3 = "1.1.2"
material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "material3" }
And the Gradle file looks like
dependencies {
implementation(libs.material3)
}
Please share the configuration which works for you. I will try that at my end. Because the one which i have is not helping me out.
ma...@google.com <ma...@google.com> #17
As seen in 1.2.0-alpha02
and later. Try upgrading to a version past that (the latest is version 1.2.0-alpha09
ra...@gmail.com <ra...@gmail.com> #18
Thank you for your feedback. Everything is functioning perfectly as anticipated with library 1.2.0-alpha02
.
pr...@google.com <pr...@google.com> #19
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.6.0-alpha08
androidx.compose.material:material-android:1.6.0-alpha08
androidx.compose.material:material-desktop:1.6.0-alpha08
Description
Jetpack Compose component used: Material 3
Android Studio Build: #AI-222.4459.24.2221.9471578
Kotlin version: 1.8.10
Steps to Reproduce or Code Sample to Reproduce:
1. Have a emulator Pixel 6 with API 33
2. Increase in system settings Font Size to Maximum
3. Increase in system settings Display Size to Maximum
4. Have a `NavigationBar` with 4 `NavigationBarItem` items added
5. Run the app
Expected behaviour:
The text and icons do not overlap each other
Actual behaviour:
The text and icons overlap each other