gpt4 book ai didi

java - 如何在TextView中插入 "<<"文本?

转载 作者:搜寻专家 更新时间:2023-10-30 21:19:03 24 4
gpt4 key购买 nike

我需要在 android:text = "<<" 中插入“<<”但存在以下问题:

Multiple annotations found at this line:
- [I18N] Hardcoded string "<<", should use @string resource
- The value of attribute "android:text" associated with an element type "Button" must not contain the '<'
character.

你能告诉我如何插入 <<在 xml 文件中 TextView文本?

最佳答案

尝试 &lt;&lt;而不是 << .您必须转义这些字符,因为它们会影响您的 XML 布局。

关于java - 如何在TextView中插入 "<<"文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10383006/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com