Status Update
Comments
jo...@google.com <jo...@google.com>
xb...@google.com <xb...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Fix fillInLabel not encoded by NavType
Expand for full commit details
Fix fillInLabel not encoded by NavType
When parsing labels in XML, the label will be retrieved via NavType.get. This means we will now respect the custom logic on how the label is to be retrieved from the SavedState.
Test: ./gradlew navigation:navigation-ui:cC
Bug: 388100796
Relnote: "NavDestination labels provided through XML will be parsed via NavType.get to ensure custom NavType logic is respected."
Change-Id: I7ec2f3e410b616e8933c8f5dd8015869906fb263
Files:
- M
navigation/navigation-common/src/androidMain/kotlin/androidx/navigation/NavDestination.android.kt
- M
navigation/navigation-ui/src/androidTest/java/androidx/navigation/ui/NavigationUITest.kt
Hash: 63ef852cfd918acb9b9661f739e8249cdee9f9d1
Date: Mon Jan 06 16:47:38 2025
ap...@google.com <ap...@google.com> #3
Fixed internally and available in navigation 2.9.0-alpha05
jo...@google.com <jo...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-common:2.9.0-alpha05
androidx.navigation:navigation-ui:2.9.0-alpha05
androidx.navigation:navigation-common:2.8.6
androidx.navigation:navigation-ui:2.8.6
xb...@google.com <xb...@google.com> #5
Thanks @jossiwolf@google.com for fixing this! Do you know when the fix would be available for g3 apps?
jo...@google.com <jo...@google.com> #6
Moving the internal discussion offline. The bug is fixed and the fix available in snapshot builds. We will comment on this issue when the bug fix is included in a release.
na...@google.com <na...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-beta01
androidx.compose.foundation:foundation-android:1.8.0-beta01
androidx.compose.foundation:foundation-jvmstubs:1.8.0-beta01
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-beta01
Description
- Jetpack Compose component used: BasicText
- Android Studio Build: Ladybug | 2024.2.1 Patch 2
- Kotlin version: 2.0.0
I tested out `androidx.compose.foundation:foundation:1.8.0-alpha05` and noticed that `BasicText` with an `autoSize` argument just cuts off the text with `maxLines` set to 1.
On Android Views, when using `android:autoSizeTextType="uniform"` and `android:maxLines="1"`, the `TextView` properly sizes down until the min text size is reached.
```
<LinearLayout
android:layout_width="15dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="2sp"
android:autoSizeMaxTextSize="14sp"
android:maxLines="1"
android:text="Test" />
</LinearLayout>
```
```
Box(Modifier.width(15.dp)) {
BasicText("Test", autoSize = AutoSize.StepBased(2.sp, 14.sp), maxLines = 1)
}
```