Created
March 23, 2024 15:05
-
-
Save burkido/825498849b22aa9aff0e4f4fe1d782cf 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
val annotations = listOf( | |
StringAnnotation( | |
tag = stringResource(id = R.string.terms), | |
annotation = "https://termify.io/terms-and-conditions-generator", | |
style = SpanStyle( | |
color = MaterialTheme.colorScheme.primary, | |
fontSize = MaterialTheme.typography.bodyMedium.fontSize, | |
fontStyle = MaterialTheme.typography.bodyMedium.fontStyle, | |
textDecoration = TextDecoration.Underline, | |
) | |
), | |
StringAnnotation( | |
tag = stringResource(id = R.string.privacy_policy), | |
annotation = "https://termify.io/privacy-policy-generator", | |
style = SpanStyle( | |
color = MaterialTheme.colorScheme.primary, | |
fontSize = MaterialTheme.typography.bodyMedium.fontSize, | |
fontStyle = MaterialTheme.typography.bodyMedium.fontStyle, | |
textDecoration = TextDecoration.Underline, | |
) | |
) | |
) | |
ClickableLocalizedText( | |
text = stringResource(id = R.string.agreement_text), | |
stringsAnnotations = annotations, | |
onClick = { url -> | |
// ... | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment