1+ /*
2+ * Copyright 2024 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
117package com.example.compose.snippets.text
218
319import androidx.compose.material3.Text
420import androidx.compose.runtime.Composable
521import androidx.compose.ui.Modifier
622import androidx.compose.ui.graphics.Color
7- import androidx.compose.ui.platform.LocalUriHandler
823import androidx.compose.ui.text.AnnotatedString
924import androidx.compose.ui.text.SpanStyle
1025import androidx.compose.ui.text.TextLinkStyles
@@ -21,7 +36,7 @@ fun AnnotatedHtmlStringWithLink(
2136 <p>
2237 Build <b>better apps</b> faster with <a href="https : // www.android.com">Jetpack Compose</a>
2338 </p>
24- """.trimIndent()
39+ """.trimIndent()
2540) {
2641 Text (
2742 AnnotatedString .fromHtml(
@@ -38,7 +53,6 @@ fun AnnotatedHtmlStringWithLink(
3853 )
3954}
4055
41-
4256@Preview(showBackground = true )
4357@Composable
4458private fun AnnotatedHtmlStringWithLinkPreview () {
0 commit comments