小编Ani*_*ish的帖子

如何从 xamarin android 中的超链接文本视图中删除下划线

解释

我在里面使用了 textview 有一个链接,当我点击它时它会转到网页。为了创建一个链接,我使用了 html 的锚标记。

这是我创建链接的 xml 文件

<TextView
        android:text="@string/Home"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="fill_horizontal"
        android:layout_weight="0.5"
        android:clickable="true"
        android:textColorLink="#b3b3b3"
        android:textSize="15dp"
        android:id="@+id/Terms" />
Run Code Online (Sandbox Code Playgroud)

这是我创建链接的 string.xml 文件

<string name="Home"><a href="https://www.google.co.in/ " style="color:rgb(179, 179, 179);text-decoration:none">Home</a>
Run Code Online (Sandbox Code Playgroud)

我尝试使用 css 样式 text-decoration:none 这不起作用。

我也尝试从此链接从 TextView 中的链接中 删除下划线 - Android In that spannable 在 c# 中不起作用

如何从超链接中删除下划线?

这是显示带下划线的超链接的图像

c# xamarin.android

5
推荐指数
1
解决办法
1846
查看次数

标签 统计

c# ×1

xamarin.android ×1