Skip to content

Instantly share code, notes, and snippets.

@victorbrndls
Last active October 19, 2021 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victorbrndls/0ef7691ab01893f5147edabe4a04d4e0 to your computer and use it in GitHub Desktop.
Save victorbrndls/0ef7691ab01893f5147edabe4a04d4e0 to your computer and use it in GitHub Desktop.
buildAnnotatedString {
  append("This is some unstyled text\\n")
  withStyle(SpanStyle(color = Color.Red)) {
    append("Red text\\n")
  }
pushStringAnnotation(tag = "URL", annotation = "<https://developer.android.com>")
  withStyle(SpanStyle(fontSize = 24.sp)) {
    append("Large text")
  }
pop()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment