How to put space character into a string name in XML?

后端 未结 14 2141
谎友^
谎友^ 2020-12-12 13:31

i have defined some strings in the strings.xml file. Now I need to put some extra space between some numbers in the string. When I type extra space characters t

14条回答
  •  孤街浪徒
    2020-12-12 13:53

    As per your question if you want add spaces more than one in string resources their are many option to add spaces between character or word :

    1.By default one space you can add directly in string resource file it working fine. but if give more than one space inside string resources file then it exclude that spaces. eg . -4, 5, -5, 6, -6,

    1. If you want add more extra spaces inside string resource file then uses:- i. adding unicode after character like

          -4,  5,  -5,  6,  -6,
      

    ii.you can use "\u0020"

    -4,\u0020\u0020 5,\u0020\u00205 -5,\u0020\u00205 6,\u0020\u00205 -6,
    

提交回复
热议问题