【发布时间】:2014-05-14 18:30:36
【问题描述】:
我在带有strings.xml 的 Toast 中显示错误消息。
像这样
mErrorMsgId=R.string.username_or_password_incorrectfull;
但现在我需要将消息与R.string.add_selfhosted_blog 连接起来以避免翻译不一致。
阅读了一些类似的问题,但无法弄清楚。
编辑:
我想在 username_or_password_incorrectfull 字符串中的单词 tap 之后连接 nux_add_selfhosted_blog ...
<string name="username_or_password_incorrectfull">The username or password you entered is incorrect
\- If you\'re a self hosted user, don\'t forget to tap **Add Self Hosted Site** and fill the URL field</string>
<string name="nux_add_selfhosted_blog">Add self-hosted site</string>
我怎样才能做到这一点??
【问题讨论】:
-
向我们展示更多代码以更好地帮助您,字符串连接实际上是一件非常简单的事情
-
请阅读编辑...
标签: java android string-concatenation string-formatting