如何在字符串数组中的字符串下划线
我在 strings.xml 中有一个字符串数组。如何为 item 中的字符串添加下划线?
对于字符串,我们这样做。
<string name="clickable_string">This is a <u>clickable string</u></string>
我尝试了这样的事情。
<string-array name="products">
<item>this is a <u> clickable</u> string </item>
<item> <u> clickable</u> string </item>
<item>this is a <u> clickable</u> string </item>
</string-array>
它不起作用。我怎样才能做到这一点? 谢谢
I have a string-array in strings.xml. How can I underline the string in item?
For string we do like this..
<string name="clickable_string">This is a <u>clickable string</u></string>
I tried something like this.
<string-array name="products">
<item>this is a <u> clickable</u> string </item>
<item> <u> clickable</u> string </item>
<item>this is a <u> clickable</u> string </item>
</string-array>
Its not working. How can I do that?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(2)
尝试这种方式它会工作
在java代码中使用这个:
Try this way it will work
In java Code use this :
试试这个:(
即)替换 <和>与<和>在您的 strings.xml 中获取 HTML 格式的内容。
并在您的代码中使用:
Try this:
(i.e) Replace the < and > with <; and >; in your strings.xml for HTML formatted content.
And in your code use: