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)
Request for new functionality
View staffing
Description
From what I can gather, it's currently not possible to click a specific part of an AnnotatedString.
Assume we have a String like
"This is a string where [a]this part[/a] is clickable."
, and let's say we later build an AnnotatedString like this:In a UI test, I want to click the text
"this part"
. I think it's currently only possible usingperformTouchInput()
and then clicking an area of the string, but that sounds really flaky to me:Since we're already providing a
tag
to the part we're interested in (viapushStringAnnotation()
), it would be great to be able to do something like:In Espresso, this was easy enough by implementing a custom ViewAction that would find the spans in the current TextView's text, but it appears we're missing a similar functionality for Compose.