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
Glance's
Text
composable only acceptstext
as aString
. This prevents using any annotated text with Glance widgets.For example, a PR adding a widget to our Compose samples can't format the part of the text.
While supporting Composes'
AnnotatedString
would be ideal, I understand this might be a big task, because we'd need to translate it to theRemoteViews
SpannableString
.As a first step I suggest changing the
text
to theCharSequence
, which immediatelly enables usingSpannableString
and maybe show a reasonable error whyAnnotatedString
won't work.Example usinghttps://screenshot.googleplex.com/7bjJrhZw7riBiuf
SpannableString
in Glance widget: