How to clear TextField focus when closing the keyboard and prevent two back presses needed to exit app in Jetpack Compose?

There’s a compose issue with focused text field prevents back button from dismissing the app when keyboard is hidden. It’s marked as fixed, but will be included in some future release, not in 1.0 But, as I understand, the fact that text field is not loosing focus after keyboard being dismissed, is intended behaviour on … Read more

Jetpack Compose Text hyperlink some section of the text

For a complete answer you can use ClickableText which returns the position of text, and UriHandler to open URI in a browser. val annotatedLinkString: AnnotatedString = buildAnnotatedString { val str = “Click this link to go to web site” val startIndex = str.indexOf(“link”) val endIndex = startIndex + 4 append(str) addStyle( style = SpanStyle( color … Read more