Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Problem
Using
dev12
, I'm trying to process a touch event of aTextView
that contains HTML links using theAndroidView
API.Use case
As Compose's
Text
doesn't supportSpannable
yet, I need to useHtmlCompat.fromHtml
to display text formatted in HTML that contains external links.Troubleshooting
Tried with different XML attributes in
TextView
but couldn't get it to workHow
AndroidView
is used in code:In the XML file, I tried with:
android:textIsSelectable="true"
that used to work in the current View system andandroid:clickable="true"
that doesn't work either.How to reproduce
You can get the code from the
compose
branch of my fork of Sunflower:Compose code can be found in
PlantDetailView.kt
that usesitem_plant_description.xml
to display the TextView with HTML code within it.