Status Update
Comments
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #2
I've submitted a fix for this, which should (I hope) make it into Jellyfish Canary 12. There's a relatively straightforward workaround, which is to explicitly declare the version of the com.android.tools.build:gradle
artifact in all build files -- in the screenshot, your project has a versioned classpath
dependency, but also an unversioned one, and it's that unversioned one that tripped up the AGP Upgrade Assistant. Since there is that workaround of making sure that all the classpath dependencies on com.android.tools.build:gradle
have an explicit version, we probably won't patch this for Iguana, I'm afraid.
Thanks very much for the report!
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
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Jellyfish | 2023.3.1 Canary 12
- Android Gradle Plugin 8.4.0-alpha12
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #5
si...@google.com <si...@google.com> #6
same problem in latest koala, AGP upgrade assistant never opens
Please could you open a new issue, and upload enough details about your project to be able to investigate or (ideally) reproduce the problem? Thank you!
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
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
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
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
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
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
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
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: