Daniele B
10/19/2020, 4:16 PMnglauber
10/19/2020, 4:23 PMAnnotatedString
.
val builder = AnnotatedString.Builder().apply {
append(
AnnotatedString(
"Texto Bold",
SpanStyle(fontWeight = FontWeight.Bold)
)
)
append(
AnnotatedString(
"Texto Strike",
SpanStyle(textDecoration = TextDecoration.LineThrough)
)
)
append(
AnnotatedString(
"Texto Big",
SpanStyle(fontSize = 24.sp)
)
)
append(
AnnotatedString(
"Texto Red",
SpanStyle(color = Color.Red)
)
)
}
Text(text = builder.toAnnotatedString())
Daniele B
10/19/2020, 4:26 PMHalil Ozercan
10/19/2020, 4:31 PMcompose-richtext
[0] if you want something quick. It doesn't support markup/markdown rendering right now but would give you a good idea of how to accomplish something like that. Also there is a PR[1] for exactly doing "markdown rendering" using compose-richtext
.
[0] https://github.com/zach-klippenstein/compose-richtext
[1] https://github.com/halilozercan/compose-richtext/pull/1Zach Klippenstein (he/him) [MOD]
10/19/2020, 4:36 PM