Kazemihabib1996
05/23/2020, 3:38 PM(Html.fromHtml(htmlString , Html.FROM_HTML_MODE_LEGACY)));
in compose?Adam Powell
05/23/2020, 3:52 PMpardom
05/24/2020, 2:02 AMKazemihabib1996
05/24/2020, 7:04 AMAnnotatedStrings
with(DensityAmbient.current) {
// this box is acting as a character, so it's sized with font scaling (sp)
Box(
modifier = Modifier
.preferredSize(8.sp.toDp(), 8.sp.toDp())
.alignWithSiblings {
// Add an alignment "baseline" 1sp below the bottom of the circle
9.sp.toIntPx()
},
backgroundColor = contentColor(),
shape = CircleShape
)
}
in JetNews sample.pardom
05/24/2020, 5:05 PMSpannedString
to an AnnotatedString
Html.fromHtml
or https://github.com/noties/MarkwonAnnotatedString
has an equivalent of ClickableSpan
. It appears you can only style text.Kazemihabib1996
05/24/2020, 5:52 PMAdam Powell
05/24/2020, 6:16 PMSpannedString
to AnnotatedString
is going to be a lossy conversion, AnnotatedString is deliberately less open-ended to avoid a bunch of issues we had with SpannedString
pardom
05/24/2020, 6:20 PMSpannedString
is very open-ended 😆 I used it to implement Slack style tokenization once, which was neat, but felt unnerving considering the lack of an interface for spans.Adam Powell
05/24/2020, 6:32 PM