Fixed
Status Update
Comments
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit a330c0d3bcdd41326f37968a60e6084ad4a2e32c
Author: Chet Haase <chet@google.com>
Date: Wed Jul 05 07:26:46 2023
Convert APIs using PointF to use Float instead
PointF is a convenient mechanism for passing around x.y values
representing 2D points. But there are downsides, including:
- Converting to PointF: You may not have the data in PointF form
to begin with, so using an API which takes PointF requires converting
the data to that form (including allocating a PointF object every time)
- Mutability: Point structures can be mutated internally, causing
unpredictability in what that mutation means. Should the library
react to those changes? Ignore them? Do defensive copies (requiring
even more allocations)? Using primitive types like Float make the
behavior more obvious (by making the data inherently immutable).
- Allocations: Whenever we use object types, there are necessarily
allocations on the Java heap for them. This puts pressure on the GC
at both allocation and collection time. Given the amount of points
being passed around (especially at morph creation time, when curves
are being split and created), this causes a lot of PointF objects to
be allocated (even temporarily). Using Float avoids that problem.
Also fixed bug with unclosed paths causing discontinuity at the
start/end point.
Bug: 276466399
Bug: 290254314
Test: integration and unit tests pass
Relnote: PointF parameters changed to Float pairs
Change-Id: Id4705d27c7be31b26ade8186b99fffe2e2f8450e
M graphics/graphics-shapes/api/current.txt
M graphics/graphics-shapes/api/restricted_current.txt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicShapeTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonMeasureTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/RoundedPolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/ShapesTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/TestUtils.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Cubic.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/CubicShape.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FeatureMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FloatMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Morph.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/PolygonMeasure.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/RoundedPolygon.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Shapes.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Utils.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/DebugDraw.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/ShapeEditor.kt
M graphics/integration-tests/testapp/src/main/java/androidx/graphics/shapes/test/MaterialShapes.kt
https://android-review.googlesource.com/2649119
Branch: androidx-main
commit a330c0d3bcdd41326f37968a60e6084ad4a2e32c
Author: Chet Haase <chet@google.com>
Date: Wed Jul 05 07:26:46 2023
Convert APIs using PointF to use Float instead
PointF is a convenient mechanism for passing around x.y values
representing 2D points. But there are downsides, including:
- Converting to PointF: You may not have the data in PointF form
to begin with, so using an API which takes PointF requires converting
the data to that form (including allocating a PointF object every time)
- Mutability: Point structures can be mutated internally, causing
unpredictability in what that mutation means. Should the library
react to those changes? Ignore them? Do defensive copies (requiring
even more allocations)? Using primitive types like Float make the
behavior more obvious (by making the data inherently immutable).
- Allocations: Whenever we use object types, there are necessarily
allocations on the Java heap for them. This puts pressure on the GC
at both allocation and collection time. Given the amount of points
being passed around (especially at morph creation time, when curves
are being split and created), this causes a lot of PointF objects to
be allocated (even temporarily). Using Float avoids that problem.
Also fixed bug with unclosed paths causing discontinuity at the
start/end point.
Bug: 276466399
Bug: 290254314
Test: integration and unit tests pass
Relnote: PointF parameters changed to Float pairs
Change-Id: Id4705d27c7be31b26ade8186b99fffe2e2f8450e
M graphics/graphics-shapes/api/current.txt
M graphics/graphics-shapes/api/restricted_current.txt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicShapeTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonMeasureTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/RoundedPolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/ShapesTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/TestUtils.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Cubic.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/CubicShape.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FeatureMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FloatMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Morph.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/PolygonMeasure.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/RoundedPolygon.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Shapes.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Utils.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/DebugDraw.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/ShapeEditor.kt
M graphics/integration-tests/testapp/src/main/java/androidx/graphics/shapes/test/MaterialShapes.kt
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #3
PointF was the main (possibly only) mutability issue, marking this as fixed
no...@google.com <no...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.graphics:graphics-shapes:1.0.0-alpha04
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #5
Talked with Nona, in order to prioritize the quality of other features he added we will take over this feature from Nona.
si...@google.com <si...@google.com> #6
removed from June release since we will not be able to finish these tasks until June.
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #7
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
ub...@gmail.com <ub...@gmail.com> #8
Any progress here?
ub...@gmail.com <ub...@gmail.com> #10
Related issue regarding styled string resources:
In particular, internationalization concerns described in
gr...@google.com <gr...@google.com> #11
If this ever does get implemented, note that it would be nice to have the cursor icon change when hovering over a link.
aa...@marinosoftware.com <aa...@marinosoftware.com> #12
@#8 They said it's due to be finished in June. What year is anyone's guess.
si...@google.com <si...@google.com>
so...@google.com <so...@google.com>
so...@google.com <so...@google.com>
so...@google.com <so...@google.com>
ap...@google.com <ap...@google.com> #13
Project: platform/frameworks/support
Branch: androidx-main
commit f87f07f58309f38933b32309e93a944420a185be
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Mar 28 15:06:28 2024
Implement links interactiom listeners and styling through annotation only
LinkInteractionListener is set on LinkAnnotation. Currently only has a click function but is a fun interface. In the future can be extended to support onHover or other interactions that are needed. Note that Clickable should ideally have it non-null but this wouldn't work as we need to restore it.
LinkAnnotation now takes the style, focusStyle and hoverStyle.
Test: ui:ui-text:test, ui:ui-text:cC, f:f:cC in text folder
Relnote: "LinkAnnotation now takes the state-based styling arguments and a LinkInteractionListener. Add this annotation to the AnnotatedString to get a hyperlink. By passing focusedState and/or hoveredState you can define the visual conficuration for links when they are focused and/or hovered."
Bug: 139312671
Change-Id: I81ce4350b8a1e37881000fd82f081b7afb8e0f42
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/ui/ui-text/api/api_lint.ignore
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/samples/src/main/java/androidx/compose/ui/text/samples/AnnotatedStringBuilderSamples.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AnnotatedStringFromHtmlTest.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextFieldValueTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkInteractionListener.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
https://android-review.googlesource.com/3008514
Branch: androidx-main
commit f87f07f58309f38933b32309e93a944420a185be
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Mar 28 15:06:28 2024
Implement links interactiom listeners and styling through annotation only
LinkInteractionListener is set on LinkAnnotation. Currently only has a click function but is a fun interface. In the future can be extended to support onHover or other interactions that are needed. Note that Clickable should ideally have it non-null but this wouldn't work as we need to restore it.
LinkAnnotation now takes the style, focusStyle and hoverStyle.
Test: ui:ui-text:test, ui:ui-text:cC, f:f:cC in text folder
Relnote: "LinkAnnotation now takes the state-based styling arguments and a LinkInteractionListener. Add this annotation to the AnnotatedString to get a hyperlink. By passing focusedState and/or hoveredState you can define the visual conficuration for links when they are focused and/or hovered."
Bug: 139312671
Change-Id: I81ce4350b8a1e37881000fd82f081b7afb8e0f42
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/ui/ui-text/api/api_lint.ignore
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/samples/src/main/java/androidx/compose/ui/text/samples/AnnotatedStringBuilderSamples.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AnnotatedStringFromHtmlTest.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextFieldValueTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkInteractionListener.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
ap...@google.com <ap...@google.com> #14
Project: platform/frameworks/support
Branch: androidx-main
commit efd00b74fb310a1dc2ec3881c1539fb9a447eaef
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 03 18:16:26 2024
Add TextDefaults object to material and material3
It provides methods to construct AnnotatedString from the html string and LinkAnnotation where links will get their styling according to the Material theme
TextDefaults.Url() and TextDefaults.Clickable() composable functions that don't return Unit should normally start with lower case letter. But these are factory methods, they are upper-cased to imitate the LinkAnnotation.Url constructor.
Test: TextTest
Test: demo
Bug: 139312671
Relnote: "Added a TextDefaults object that contains methods to construct a LinkAnnotation and parse HTML-tagged string which apply MaterialTheme to the links"
Change-Id: I98532f3512d1930416f66dd195746eeeba884497
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/material/material/api/api_lint.ignore
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/build.gradle
M compose/material/material/lint-baseline.xml
A compose/material/material/samples/src/main/java/androidx/compose/material/samples/TextSamples.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/TextTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Text.kt
M compose/material3/material3/api/api_lint.ignore
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/lint-baseline.xml
A compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/TextSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/TextTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Text.kt
https://android-review.googlesource.com/3024605
Branch: androidx-main
commit efd00b74fb310a1dc2ec3881c1539fb9a447eaef
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 03 18:16:26 2024
Add TextDefaults object to material and material3
It provides methods to construct AnnotatedString from the html string and LinkAnnotation where links will get their styling according to the Material theme
TextDefaults.Url() and TextDefaults.Clickable() composable functions that don't return Unit should normally start with lower case letter. But these are factory methods, they are upper-cased to imitate the LinkAnnotation.Url constructor.
Test: TextTest
Test: demo
Bug: 139312671
Relnote: "Added a TextDefaults object that contains methods to construct a LinkAnnotation and parse HTML-tagged string which apply MaterialTheme to the links"
Change-Id: I98532f3512d1930416f66dd195746eeeba884497
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/material/material/api/api_lint.ignore
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/build.gradle
M compose/material/material/lint-baseline.xml
A compose/material/material/samples/src/main/java/androidx/compose/material/samples/TextSamples.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/TextTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Text.kt
M compose/material3/material3/api/api_lint.ignore
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/lint-baseline.xml
A compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/TextSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/TextTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Text.kt
ap...@google.com <ap...@google.com> #15
Project: platform/frameworks/support
Branch: androidx-main
commit c70a4c6be82ef1bcc338b20d663b55545caebdf9
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Apr 04 14:47:32 2024
Update LinkAnnotation savers to save/restore styles
Added demo that creates a custom listener. We should eventually add some edit/replace methods to the AnnotatedString
to make things like this easier to implement.
Bug: 139312671
Test: SaversTest
Test: demo
Change-Id: I3613a30733ba87321e4cb72a3414c0f9522ad529
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
https://android-review.googlesource.com/3027704
Branch: androidx-main
commit c70a4c6be82ef1bcc338b20d663b55545caebdf9
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Apr 04 14:47:32 2024
Update LinkAnnotation savers to save/restore styles
Added demo that creates a custom listener. We should eventually add some edit/replace methods to the AnnotatedString
to make things like this easier to implement.
Bug: 139312671
Test: SaversTest
Test: demo
Change-Id: I3613a30733ba87321e4cb72a3414c0f9522ad529
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
ap...@google.com <ap...@google.com> #16
Project: platform/frameworks/support
Branch: androidx-main
commit 703f585278dc1f9343659fd2ffa1b415e4366ba7
Author: Anastasia Soboleva <soboleva@google.com>
Date: Fri Apr 05 15:45:22 2024
Update a11y support for links in text
Fixes: 139312671
Test: demo with Talkback on
Test: AndroidAccessibilitySpannableStringTest
Change-Id: I11ef6b96dc1f791dd266e6cb5100f265ac6c2456
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/URLSpanCache.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
https://android-review.googlesource.com/3027712
Branch: androidx-main
commit 703f585278dc1f9343659fd2ffa1b415e4366ba7
Author: Anastasia Soboleva <soboleva@google.com>
Date: Fri Apr 05 15:45:22 2024
Update a11y support for links in text
Fixes: 139312671
Test: demo with Talkback on
Test: AndroidAccessibilitySpannableStringTest
Change-Id: I11ef6b96dc1f791dd266e6cb5100f265ac6c2456
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/URLSpanCache.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
ap...@google.com <ap...@google.com> #17
Project: platform/frameworks/support
Branch: androidx-main
commit 9b67b3756698b4bfa17b9060908daa5da950d250
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 10 12:20:08 2024
Add pressed styling to the link
We now basically support similar styling options as web. We don't have "visited"
which is to be handled by developers if needed. This CL adds missing pressed styling option which corresponds to "active" in css.
Test: compose:f:f:cC, compose:ui:ui-text:cC
Test: demo
Bug: 139312671
Relnote: "Text links got pressed state styling option in addition to normal styling, hovered and focused"
Change-Id: I5f864b3fd1b1af6ff39dee03e1aa65ede7e16d32
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Text.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Text.kt
M compose/ui/ui-text/api/api_lint.ignore
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AnnotatedStringFromHtmlTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/Html.android.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Html.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/Html.skiko.kt
https://android-review.googlesource.com/3035615
Branch: androidx-main
commit 9b67b3756698b4bfa17b9060908daa5da950d250
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 10 12:20:08 2024
Add pressed styling to the link
We now basically support similar styling options as web. We don't have "visited"
which is to be handled by developers if needed. This CL adds missing pressed styling option which corresponds to "active" in css.
Test: compose:f:f:cC, compose:ui:ui-text:cC
Test: demo
Bug: 139312671
Relnote: "Text links got pressed state styling option in addition to normal styling, hovered and focused"
Change-Id: I5f864b3fd1b1af6ff39dee03e1aa65ede7e16d32
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Text.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Text.kt
M compose/ui/ui-text/api/api_lint.ignore
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AnnotatedStringFromHtmlTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/Html.android.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Html.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/Html.skiko.kt
ap...@google.com <ap...@google.com> #18
Project: platform/frameworks/support
Branch: androidx-main
commit 04ffaa7cede823e9e17ceb68dce1e4583c84ccb3
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 10 12:34:58 2024
Add pressed styling for links in material/material3
Test: TextTest
Bug: 139312671
Relnote: "Text links got pressed state styling option in addition to normal styling, hovered and focused. TextDefaults methods each got a pressedStyle argument to support that."
Change-Id: Ic473f81fd32d95ad84d6bc452c8dcbf6de7ba4ba
M compose/material/material/api/api_lint.ignore
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Text.kt
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Text.kt
https://android-review.googlesource.com/3035616
Branch: androidx-main
commit 04ffaa7cede823e9e17ceb68dce1e4583c84ccb3
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 10 12:34:58 2024
Add pressed styling for links in material/material3
Test: TextTest
Bug: 139312671
Relnote: "Text links got pressed state styling option in addition to normal styling, hovered and focused. TextDefaults methods each got a pressedStyle argument to support that."
Change-Id: Ic473f81fd32d95ad84d6bc452c8dcbf6de7ba4ba
M compose/material/material/api/api_lint.ignore
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Text.kt
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Text.kt
na...@google.com <na...@google.com> #19
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.7.0-alpha07
androidx.compose.foundation:foundation-android:1.7.0-alpha07
androidx.compose.foundation:foundation-desktop:1.7.0-alpha07
androidx.compose.material:material:1.7.0-alpha07
androidx.compose.material:material-android:1.7.0-alpha07
androidx.compose.material:material-desktop:1.7.0-alpha07
androidx.compose.material3:material3:1.3.0-alpha05
androidx.compose.material3:material3-android:1.3.0-alpha05
androidx.compose.material3:material3-desktop:1.3.0-alpha05
androidx.compose.ui:ui:1.7.0-alpha07
androidx.compose.ui:ui-android:1.7.0-alpha07
androidx.compose.ui:ui-desktop:1.7.0-alpha07
androidx.compose.ui:ui-text:1.7.0-alpha07
androidx.compose.ui:ui-text-android:1.7.0-alpha07
androidx.compose.ui:ui-text-desktop:1.7.0-alpha07
za...@gmail.com <za...@gmail.com> #20
Comment has been deleted.
Description
We have the Linkify and LinkifyCompat classes. Moreover, URLSpan on android handles the visual aspects of the links and also touch handling.
However, the current system suffers a lot from a few behaviors:
- linkify using patterns make text processing slow
- the developer had no control over the creation of URLSpans which caused them not to be able to have custom logic on click.
On android hyperlinks can be styled at the widget level.
This ticket is for the first step of hyperlink support which enables the display of hyperlinks.
related document: