Created
February 23, 2022 21:33
-
-
Save DmytroShuba/992e6b8fa30d53fab597c178a87e7da3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private const val TAG_URL = "ANNOTATION_TAG_URL" | |
@Composable | |
fun MainText() { | |
val uriHandler = UriHandlerAmbient.current // utility to open links in a browser | |
val text = "Here is my website." // "my website" contains a link | |
val link = "https://dmytroshuba.com/" | |
val annotatedText = attachLink( | |
source = text, | |
segment = "my website", | |
link = link | |
) | |
ClickableText( | |
text = annotatedText, | |
onClick = { /* implementation */} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment