Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 7931e527c33a37f5c70c7468a7a6c0025578763b
Author: Halil Ozercan <halilibo@google.com>
Date: Wed Oct 05 12:44:58 2022
Add an overload to TextMeasurer.measure function that accepts String.
Many Text APIs like BasicText, BasicTextField offer overloads that accept both String and AnnotatedString. This has also been true for `DrawScope.drawText` since it was first introduced. However, TextMeasurer only provided a single measure function that accepted AnnotatedString.
This CL adds a new measure function overload to TextMeasurer which works with plain Strings. Because those cannot be annotated, this function does not take `placeholders`.
Test: TextMeasurerTest.kt
Fix: b/242705342
Relnote: "Added a new overload for `TextMeasurer.measure` function which takes in a `String` as text."
Change-Id: I47b2d079c61b4f63d7d985266869a76f1e8679a8
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextMeasurerTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextMeasurer.kt
https://android-review.googlesource.com/2239779
Branch: androidx-main
commit 7931e527c33a37f5c70c7468a7a6c0025578763b
Author: Halil Ozercan <halilibo@google.com>
Date: Wed Oct 05 12:44:58 2022
Add an overload to TextMeasurer.measure function that accepts String.
Many Text APIs like BasicText, BasicTextField offer overloads that accept both String and AnnotatedString. This has also been true for `DrawScope.drawText` since it was first introduced. However, TextMeasurer only provided a single measure function that accepted AnnotatedString.
This CL adds a new measure function overload to TextMeasurer which works with plain Strings. Because those cannot be annotated, this function does not take `placeholders`.
Test: TextMeasurerTest.kt
Fix:
Relnote: "Added a new overload for `TextMeasurer.measure` function which takes in a `String` as text."
Change-Id: I47b2d079c61b4f63d7d985266869a76f1e8679a8
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextMeasurerTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextMeasurer.kt
pr...@google.com <pr...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui-text:1.4.0-alpha05
Description
From feedback;