Status Update
Comments
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug:
Bug:
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #3
Branch: androidx-main
commit a719038d0c998e63a8cc051f7cf4d33e4848d391
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu May 04 19:23:13 2023
Handle long labels more gracefully in BottomNavigation
Essentially a port of aosp/2576690 to the M2 version.
This is a no-op for the component in the default case,
but multiline labels (which are discouraged by the spec)
no longer collide with the icon.
Bug:
Test: Updated BottomNavigationTest
Change-Id: Ib9c491b586a1cda05836cce442f6391131eb6c2e
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/BottomNavigationTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BottomNavigation.kt
ju...@google.com <ju...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.5.0-beta01
androidx.compose.material3:material3:1.2.0-alpha02
androidx.compose.material3:material3-android:1.2.0-alpha02
jb...@physitrack.com <jb...@physitrack.com> #5
Hi, For sure it is better, but with 5 items we can still reproduce this without even the larger font. Could you please fix that so the text do not overlap the icon?
ra...@gmail.com <ra...@gmail.com> #6
It seems with the introduction of
Google Photo APP version: 6.54.0.566308615
As mentioned in the release note, the system has embraced a non-linear scaling curve. This approach yields a situation in which larger text components do not undergo scaling in proportion to smaller text components. For instance, a header text element may remain unaffected by size changes, while the smaller text positioned below the header may enlarge. Similarly, it appears the BottomNavigation component at the bottom is also influenced by this non-linear scaling in a similar manner. And thus text is cut-off by the image placed in the group.
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