@@ -12,6 +12,7 @@ import androidx.compose.material.icons.automirrored.filled.ArrowBack
1212import androidx.compose.material3.ExperimentalMaterial3Api
1313import androidx.compose.material3.Icon
1414import androidx.compose.material3.IconButton
15+ import androidx.compose.material3.LocalTextStyle
1516import androidx.compose.material3.MaterialTheme
1617import androidx.compose.material3.OutlinedButton
1718import androidx.compose.material3.Scaffold
@@ -30,9 +31,11 @@ import androidx.compose.ui.platform.LocalUriHandler
3031import androidx.compose.ui.res.painterResource
3132import androidx.compose.ui.res.stringResource
3233import androidx.compose.ui.text.AnnotatedString
34+ import androidx.compose.ui.text.TextLinkStyles
3335import androidx.compose.ui.text.font.FontWeight
3436import androidx.compose.ui.text.fromHtml
3537import androidx.compose.ui.text.style.TextAlign
38+ import androidx.compose.ui.text.style.TextDecoration
3639import androidx.compose.ui.unit.dp
3740import androidx.core.graphics.drawable.toBitmap
3841import androidx.datastore.preferences.core.edit
@@ -210,7 +213,16 @@ private fun TextDialog(@StringRes text: Int, state: MutableState<Boolean>) {
210213 GenericAlertDialog (
211214 content = {
212215 val htmlString = stringResource(text).replace(" \n " , " <br/>" )
213- Text (AnnotatedString .fromHtml(htmlString))
216+ val linkStyle = LocalTextStyle .current.copy(
217+ color = MaterialTheme .colorScheme.primary,
218+ textDecoration = TextDecoration .Underline
219+ ).toSpanStyle()
220+ Text (
221+ text = AnnotatedString .fromHtml(
222+ htmlString,
223+ linkStyles = TextLinkStyles (linkStyle)
224+ )
225+ )
214226 },
215227 confirmButton = stringResource(R .string.edit_calendar_dismiss) to {
216228 state.value = false
0 commit comments