I'm using links in my Android Studio project activity via setMovementMethod(LinkMovementMethod.getInstance());
.
By default links are color of AppTheme's Accent color and have a bottom line (underline). So how to customize links in TextView: remove underlining, change color and text style?
You can define your own custom styles and then apply them to your textview in the layout xml file.
<TextView
style="@style/CodeFont"
android:text="@string/hello" />
See https://developer.android.com/guide/topics/ui/themes.html for more details.
您可以覆盖android:textColorLink
属性以更改文本颜色。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.