【发布时间】:2019-06-18 11:38:46
【问题描述】:
我正在开发一个 android 应用程序,我想知道如何更改 XML 字符串中特定链接的颜色。
这在 strings_example.xml 中
<string name="hello_there">Hello There!<a href="tel:XXXXXXXXX" color="#8ABD37>More info!</a></string>
这是我的活动布局
<TextView
somecode
android:text="@strings/hello_there"
style="@styles/whatever"/>
那么,如何在不覆盖 xml 字符串中的颜色的情况下应用“任何样式”?
另外:我不能将样式放在 xml 字符串中,我必须从 TextView 设置样式
【问题讨论】: