逃生" @"字符的Andr​​oid [英] Escape "@" character in Android

查看:159
本文介绍了逃生" @"字符的Andr​​oid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方式来逃避@符号在一个字符串的开始,在Android中的strings.xml资源。我不断收到编译错误,并在Eclipse中的布局建设者拒绝工作:(。有谁知道?

I'm looking for a way to escape the "@" symbol at the start of a string, in Android strings.xml resource. I'm continuously getting compilation errors and the layout builder in Eclipse refuses to work :(. Does anyone know how?

推荐答案

在Android的文档的网站,它说用一个双反斜线来转义字符。

On the Android Documentation website, it says to use a double backslash to escape characters.

<字符串名称=叽叽喳喳> \\ @ mytwitter< /字符串>

< string name="twitter">\\@mytwitter< /string>

这篇关于逃生&QUOT; @&QUOT;字符的Andr​​oid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆