Fixed
Status Update
Comments
jo...@google.com <jo...@google.com>
xb...@google.com <xb...@google.com> #2
Running into a similar issue, any update on this?
ap...@google.com <ap...@google.com> #3
This is a platform behavior change.
jo...@google.com <jo...@google.com> #4
Reassigning to current owner per go/androidx/owners.
xb...@google.com <xb...@google.com> #5
Re-triaging by request.
jo...@google.com <jo...@google.com> #6
Any progress?
na...@google.com <na...@google.com> #7
deleted
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)
}
```