1. 这些特殊字符使用的时候很纠结。

    android:text   设置这个属性时会报错

    "        (" 或 &quot;)  '         (' 或 &apos;) &       (& 或 &amp;) <       (< 或 &lt;) >       (> 或 &gt;)

  2. 2

    直接用时,就会这样报错。

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

  3. 3

    为了避免这个问题

    用在string.xml中设置

    <!-- < --><string name="s_back"><</string>

  4. 4

    下面的字符在 [XML]中被定义为 空白(whitespace)字符:

    空格   ( )  Tab    ( )  回车   (
    )  换行   (
    )

  5. 5

    android 很多特殊字符都是 ISO Latin-1字符集

    下面是对照表

    ---&#00;---未使用Unused

    ---&#01;---未使用Unused

    ---&#02;---未使用Unused

    ---&#03;---未使用Unused

    ---&#04;---未使用Unused

    ---&#05;---未使用Unused

    ---&#06;---未使用Unused

    ---&#07;---未使用Unused

    ---&#08;---未使用Unused

    --- ---制表符Horizontal tab

    ---
    ---换行Line feed

    ---&#11;---未使用Unused

    ---&#12;---未使用Unused

    ---
    ---回车Carriage Return

    ---&#14;---未使用Unused

    ---&#15;---未使用Unused

    ---&#16;---未使用Unused

    ---&#17;---未使用Unused

    ---&#18;---未使用Unused

    ---&#19;---未使用Unused

    ---&#20;---未使用Unused

  6. ---&#21;---未使用Unused

    ---&#22;---未使用Unused

    ---&#23;---未使用Unused

    ---&#24;---未使用Unused

    ---&#25;---未使用Unused

    ---&#26;---未使用Unused

    ---&#27;---未使用Unused

    ---&#28;---未使用Unused

    ---&#29;---未使用Unused

    ---&#30;---未使用Unused

    ---&#31;---未使用Unused

    ---Space

    !!---惊叹号Exclamation mark

    ""&quot;双引号Quotation mark

    ##---数字标志Number sign

    $$---美元标志Dollar sign

    %%---百分号Percent sign

    &&&amp;Ampersand

    ''---单引号Apostrophe

    ((---小括号左边部分Left parenthesis

    ))---小括号右边部分Right parenthesis

  7. **---星号Asterisk

    ++---加号Plus sign

    ,,---逗号Comma

    -----连字号Hyphen

    ..---句号Period (fullstop)

    //---斜杠Solidus (slash)

    00---数字0 Digit 0

    11---数字1 Digit 1

    22---数字2 Digit 2

    33---数字3 Digit 3

    44---数字4 Digit 4

    55---数字5 Digit 5

    66---数字6 Digit 6

    77---数字7 Digit 7

    88---数字8 Digit 8

    99---数字9 Digit 9

    ::---冒号Colon

    ;;---分号Semicolon

    <<&lt;小于号Less than

    ==---等于符号Equals sign

    >>&gt;大于号Greater than

  8. ??---问号Question mark

    @@---Commercial at

    AA---大写A Capital A

    BB---大写B Capital B

    CC---大写C Capital C

    DD---大写D Capital D

    EE---大写E Capital E

    FF---大写F Capital F

    GG---大写G Capital G

    HH---大写H Capital H

    II---大写J Capital I

    JJ---大写K Capital J

    KK---大写L Capital K

    LL---大写K Capital L

    MM---大写M Capital M

    NN---大写N Capital N

    OO---大写O Capital O

    PP---大写P Capital P

    QQ---大写Q Capital Q

    RR---大写R Capital R

    SS---大写S Capital S

    TT---大写T Capital T

  9. UU---大写U Capital U

    VV---大写V Capital V

    WW---大写W Capital W

    XX---大写X Capital X

    YY---大写Y Capital Y

    ZZ---大写Z Capital Z

    [[---中括号左边部分Left square bracket

    /\---反斜杠Reverse solidus (backslash)

    ]]---中括号右边部分Right square bracket

    ^^---Caret

    __---下划线Horizontal bar (underscore)

    ``---尖重音符Acute accent

    aa---小写a Small a

    bb---小写b Small b

    cc---小写c Small c

    dd---小写d Small d

    ee---小写e Small e

    ff---小写f Small f

    gg---小写g Small g

    hh---小写h Small h

    ii---小写i Small i

  10. jj---小写j Small j

    kk---小写k Small k

    ll---小写l Small l

    mm---小写m Small m

    nn---小写n Small n

    oo---小写o Small o

    pp---小写p Small p

    qq---小写q Small q

    rr---小写r Small r

    ss---小写s Small s

    tt---小写t Small t

    uu---小写u Small u

    vv---小写v Small v

    ww---小写w Small w

    xx---小写x Small x

    yy---小写y Small y

    zz---小写z Small z

    {{---大括号左边部分Left curly brace

    ||---竖线Vertical bar

    }}---大括号右边部分Right curly brace

    ~~---Tilde

  11. ------未使用Unused

    &nbsp;空格Nonbreaking space

    ¡¡&iexcl;Inverted exclamation

    ¢¢&cent;货币分标志Cent sign

    ££&pound;英镑标志Pound sterling

    ¤¤&curren;通用货币标志General currency sign

    ¥¥&yen;日元标志Yen sign

    ¦¦&brvbar; or &brkbar;断竖线Broken vertical bar

    §§&sect;分节号Section sign

    ¨¨&uml; or &die;变音符号Umlaut

    ©©&copy;版权标志Copyright

    ªª&ordf;Feminine ordinal

    ««&laquo;Left angle quote, guillemet left

    ¬¬&notNot sign

    ­&shy;Soft hyphen

    ®®&reg;注册商标标志Registered trademark

    ¯¯&macr; or &hibar;长音符号Macron accent

    °°&deg;度数标志Degree sign

    ±±&plusmn;加或减Plus or minus

    ²²&sup2;上标2 Superscript two

    ³³&sup3;上标3 Superscript three

  12. ´´&acute;尖重音符Acute accent

    µµ&micro;Micro sign

    ¶¶&para;Paragraph sign

    ··&middot;Middle dot

    ¸¸&cedil;Cedilla

    ¹¹&sup1;上标1 Superscript one

    ºº&ordm;Masculine ordinal

    »»&raquo;Right angle quote, guillemet right

    ¼¼&frac14;四分之一Fraction one-fourth

    ½½&frac12;二分之一Fraction one-half

    ¾¾&frac34;四分之三Fraction three-fourths

    ¿¿&iquest;Inverted question mark

    ÀÀ&Agrave;Capital A, grave accent

    ÁÁ&Aacute;Capital A, acute accent

    ÂÂ&Acirc;Capital A, circumflex

    ÃÃ&Atilde;Capital A, tilde

    ÄÄ&Auml;Capital A, di?esis / umlaut

    ÅÅ&Aring;Capital A, ring

    ÆÆ&AElig;Capital AE ligature

    ÇÇ&Ccedil;Capital C, cedilla

    ÈÈ&Egrave;Capital E, grave accent

    ÉÉ&Eacute;Capital E, acute accent

  13. ÊÊ&Ecirc;Capital E, circumflex

    ËË&Euml;Capital E, di?esis / umlaut

    ÌÌ&Igrave;Capital I, grave accent

    ÍÍ&Iacute;Capital I, acute accent

    ÎÎ&Icirc;Capital I, circumflex

    ÏÏ&Iuml;Capital I, di?esis / umlaut

    ÐÐ&ETH;Capital Eth, Icelandic

    ÑÑ&Ntilde;Capital N, tilde

    ÒÒ&Ograve;Capital O, grave accent

    ÓÓ&Oacute;Capital O, acute accent

    ÔÔ&Ocirc;Capital O, circumflex

    ÕÕ&Otilde;Capital O, tilde

    ÖÖ&Ouml;Capital O, di?esis / umlaut

    ××&times;乘号Multiply sign

    ØØ&Oslash;Capital O, slash

    ÙÙ&Ugrave;Capital U, grave accent

    ÚÚ&Uacute;Capital U, acute accent

    ÛÛ&Ucirc;Capital U, circumflex

    ÜÜ&Uuml;Capital U, di?esis / umlaut

    ÝÝ&Yacute;Capital Y, acute accent

    ÞÞ&THORN;Capital Thorn, Icelandic

  14. ßß&szlig;Small sharp s, German sz

    àà&agrave;Small a, grave accent

    áá&aacute;Small a, acute accent

    ââ&acirc;Small a, circumflex

    ãã&atilde;Small a, tilde

    ää&auml;Small a, di?esis / umlaut

    åå&aring;Small a, ring

    ææ&aelig;Small ae ligature

    çç&ccedil;Small c, cedilla

    èè&egrave;Small e, grave accent

    éé&eacute;Small e, acute accent

    êê&ecirc;Small e, circumflex

    ëë&euml;Small e, di?esis / umlaut

    ìì&igrave;Small i, grave accent

    íí&iacute;Small i, acute accent

    îî&icirc;Small i, circumflex

    ïï&iuml;Small i, di?esis / umlaut

    ðð&eth;Small eth, Icelandic

    ññ&ntilde;Small n, tilde

    òò&ograve;Small o, grave accent

    óó&oacute;Small o, acute accent

  15. ôô&ocirc;Small o, circumflex

    õõ&otilde;Small o, tilde

    öö&ouml;Small o, di?esis / umlaut

    ÷÷&divide;除号Division sign

    øø&oslash;Small o, slash

    ùù&ugrave;Small u, grave accent

    úú&uacute;Small u, acute accent

    ûû&ucirc;Small u, circumflex

    üü&uuml;Small u, di?esis / umlaut

    ýý&yacute;Small y, acute accent

    þþ&thorn;Small thorn, Icelandic

    ÿÿ&yuml;Small y, umlaut

  16. https://jingyan.baidu.com/article/84b4f565e0148360f6da323e.html:原文章地址

【Android】android strings.xml转义字符相关推荐

  1. 修改Android中strings.xml文件, 动态改变数据

    有些朋友可能会动态的修改Android中strings.xml文件中的值,在这里给大家推荐一种简单的方法. strings.xml中节点是支持占位符的,如下所示: <string name=&q ...

  2. Android的strings.xml多语言翻译

    Android的strings.xml多语言翻译 之前尝试过使用Android studio上的翻译插件进行翻译,翻译的结果可想而知,简直太慢了,所以打算直接搞个外部翻译xml文件,再将翻译好的文件重 ...

  3. android编程strings,Android开发: strings.xml文件中的错误

    编辑strings.xml的时候 在行http://code.dd.com/rr?q=%rr.55 提示下面的错误 Multiple annotations found at this line: - ...

  4. Android中String.xml中空格转义字符不起作用

    看图: 为了优化体验,需要将"日期"和上面的提示语言保持上下对齐-简单来说就是要在"日期"中间加一个空格. 上网一搜,千篇一律全都是空格转义字符- (别忘了分号 ...

  5. Android --- 快速将字符串定义到strings.xml文件的方法

    前言 作为Android开发来说,为了预防乱码和方便后期国际化扩展,将代码或者布局中的字符串定义到strings.xml文件中是很有必要的.这也是编程的一个良好习惯. 操作方法 如下图:先将字符串定义 ...

  6. android xml 画下划线,android – strings.xml:如何从标记前面的空格中删除下划线?...

    我的strings.xml中有以下行: This is a test 在我的活动xml中,我在TextView中引用了这个字符串: android:layout_width="wrap_co ...

  7. 不可不知的 Android strings.xml 那些事

    不可不知的 Android strings.xml 那些事 相信 strings.xml 已经是大家在 Android 开发中最熟悉的文件之一了,但其实它也有很多需要注意的地方和一些小技巧,知道了这些 ...

  8. Android 字符串资源(strings.xml)

    文章目录 基础使用 1. String 2. String Array 进阶使用 1. 特殊字符转义 2. 设置字符串格式 3. 使用HTML标记设置样式 4. 使用注解设置样式 注意事项❗❗❗ 1. ...

  9. Android Studio翻译strings.xml为多国语言

    前言 做完android app后需要做多国语言支持怎么办?通过百度或GOOGLE翻译一个个操作是不切实际的. 参考过AndroidLocalizationer,发现需要申请KEY,太麻烦.继续找,发 ...

最新文章

  1. C#如何判断线程池中所有的线程是否已经完成(转)
  2. ASP.NET 学习笔记_01 广告控件的使用
  3. C++ stringstream的用法
  4. android读取短信内容简书,Android 获取App信息
  5. nginx学习之location块
  6. kudu大量数据更新_i2Stream提升异构数据库数据的互联互通
  7. SpringBoot项目打成jar包后,无法读取resources下的文件
  8. AQS.addWaiter
  9. URI和URL的区别(12万访问量)
  10. SAP Smart Business design time = CDS view SADL
  11. nowcoder 牛牛的最大兴趣组 质因子 + 思维
  12. openfire log4j:ERROR setFile(null,true) call failed.
  13. 作品展结束了,学习才真正的开始
  14. bootstrapt学习指南_bootstrap-知识点梳理-学习入门篇
  15. system.data.oracleclient requires oracle client software version 8.1.7 or greater问题(转贴)
  16. 增加网站的档次!网页设计师可在网站中加入暗色调
  17. jquery 遍历java对象_jquery中object对象循环遍历的方法
  18. DOS时代往事的回忆
  19. 软件工程专业的论文答辩_2015软件工程硕士论文答辩流程
  20. 详解动态规划算法(Python实现动态规划算法典型例题)

热门文章

  1. [转载]复杂网络研究机构与大牛
  2. 适用于南方电网61850icd模型文件的模型定义导出工具
  3. 站长之家最新备案域名信息爬取
  4. 各类食物的合理烹饪方法
  5. 把黄金圣衣交给圣斗士:HDC.Cloud 2021的硬核春天
  6. 解决SpringBoot+SpringCloud中feign调用服务传递参数为MultipartFile的问题
  7. C语言函数大全(包含大部分的函数,每个函数包括函数名,功能,用法,举例。)
  8. android qq右上加号,仿QQ空间点击加号弹出菜单特效
  9. telnet与防火墙
  10. Docker 是什么