【问题标题】:How to color an underline on android studio?如何在android studio上为下划线着色?
【发布时间】:2022-01-19 12:34:10
【问题描述】:

我把这个代码放在字符串类别上:

<string name="MyunderLine"> <u> <font> the_text </font> </u></string>

如何从这里更改下划线颜色?

【问题讨论】:

    标签: android-studio colors fonts styles underline


    【解决方案1】:

    你可以像这样改变字符串的颜色。

     <string name="MyunderLine"> <u> <font color="#FF0000"> the_text </font> </u> </string>
    

    据我所知,您无法仅使用字符串资源更改下划线的颜色。

    【讨论】:

    • 哦,那你知道另一种方法吗?
    • 我不知道字符串的上下文,也不知道您使用的是 Compose 还是 XML。
    • 如果您向我展示与此字符串相关的布局代码,我可以提供帮助。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-19
    • 2021-08-20
    • 2023-02-11
    相关资源
    最近更新 更多