【发布时间】:2020-12-30 15:07:30
【问题描述】:
我有一个TextView,它显示了除链接之外的所有插入文本,但它们应该在的位置仍然是可点击的,并将我带到所需的目的地。什么会使链接本身不可见?
来自字符串资源
<string name="credits">Video from <a href="http://youtube.com">Youtube</a></string>
从布局
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/colorAccent"
android:fontFamily="@font/abril_fatface"
android:lineSpacingExtra="12sp"
android:paddingLeft="16dp"
android:paddingTop="75dp"
android:paddingRight="16dp"
android:text="@string/credits"
android:textAlignment="center"
android:textColor="@color/colorPrimaryDark"
android:textSize="30sp" />
来自活动
textCredits.movementMethod = LinkMovementMethod.getInstance()
【问题讨论】:
标签: android kotlin hyperlink textview invisible