Skip to content

Commit

Permalink
underline text
Browse files Browse the repository at this point in the history
  • Loading branch information
avan1235 committed Feb 6, 2024
1 parent 38508a3 commit bebe53a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions composeApp/src/commonMain/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.input.key.*
import androidx.compose.ui.platform.LocalClipboardManager
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.ParagraphStyle
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.*
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
Expand Down Expand Up @@ -91,6 +89,7 @@ fun App() {
ClickableText(
text = annotatedString,
modifier = Modifier.fillMaxWidth(),
style = TextStyle(textDecoration = TextDecoration.Underline),
onClick = { position ->
annotatedString
.getStringAnnotations(URL_TAG, position, position)
Expand Down

0 comments on commit bebe53a

Please sign in to comment.