For the views declared in XML we could use SpannableStringBuilder
as mentioned here https://stackoverflow.com/a/4897412/9715339 to color that partial string.
But with JetPack compose Text
I am not able to achieve the same with only single Text
.
I want something like this.
As you can see only "Sign up" text has different color and Also I would like to make it clickable.
This is how my text code looks at the moment
Text(text = "Don't have an account? Sign Up",
modifier = Modifier.align(Alignment.BottomCenter),
style = MaterialTheme.typography.h6,
color = MaterialTheme.colors.secondary,
)
Is this possible in jetpack compose?