Android special characters
Last Update:2016-02-23
Source: Internet
Author: User
<span id="Label3"></p>In the project to display special symbols in the string.xml, such as the @ colon, and so on, Direct write certainly Not. Only consider using ASCII code for display:<br><br>@ No. & #064;<br>: No. & #058;<br>Spaces & #160; In the layout file<pre><pre><string name= "followers_text" > attention (%s) </string><br><br></pre></pre><pre><pre><span style="color: #3366ff;"></span><br><br>Or<br><span style="line-height: 1.5; color: #3366ff;">GetString (r.string.followers_text, "");</span></pre></pre><pre><pre><br>Or<br><br></pre></pre><p><p><span style="color: #0000ff;">1, the whole type, such as "miss 23 years old This year", this 23 is the integer type. This can be written in string.xml,</span></p></p><pre><pre><span style="color: #0000ff;">Java code</span></pre></pre> <ol start="1"> <ol start="1"> <li><p><span style="color: #0000ff;"><string name= "old" > miss%1$d this year </string></span></p></li> </ol> </ol><p><p><br><span style="color: #0000ff;">In the program, use the</span></p></p> <ol start="1"> <ol start="1"> <li><li><p><span style="color: #0000ff;">String Sageformat = getresources (). getString (r.string.old);</span></p></li></li> <li><li><p><span style="color: #0000ff;">String sfinalage = String.Format (sageformat, 23);</span></p></li></li> <li><li>Replace%1$d with <em id="__mceDel">%1$d, which means the substitution of the first integer in the entire name= "old". If there are two integer contents in a name that need to be replaced, the second one is written as:%2$d, and so on, and the following string is substituted for the specific program</em> ;</li></li> <li><li></li></li> <li><li><p><em id="__mceDel"><em id="__mceDel">2, string type, such as "my name is John doe, I come from the capital beijing"; here "john doe" and "capital beijing" need to be replaced.<br>This can be written in string.xml,</em></em></p><p><span style="color: #0000ff;">Java code</span></p> <ol start="1"> <li><p><string name= "alert" > My name is%1 $ s, I'm from%2$s</string></p></li> </ol><p><br>In the Program:</p><p><span style="color: #0000ff;">Java code</span></p> <ol start="1"> <li><p>String sageformatstring sageformat1= getresources (). getString (r.string.alert);</p></li> <li><p>Tring SFinal1 = String.Format (sAgeFormat1, "john doe", "capital beijing");</p></li> </ol><p>Here are two strings that need to be replaced, corresponding in the order of the Programs Above.</p><p><span style="color: #0000ff;"></span></p></li></li> </ol> </ol><br>The following are common ASCII decimal interchange encodings:<br><br>& #032;--> <--this is a space.<br>& #033;-->!<--<br>& #034;--> "<--xml needs to be added in front of \<br>& #035;-->#<--<br>& #036;-->$<--<br>& #037;-->%<--<br>& #038;-->&<--<br>& #039;--> ' <--<br>& #040;--> (<--<br>& #041;-->) <--<br>& #042;-->*<--<br>& #043;-->+<--<br>& #044;-->,<--<br>& #045;-->-<--<br>& #046;-->.<--<br>& #047;-->/<--<br>& #058;-->:<--<br>& #059;-->;<--<br>& #060;--><<--<br>& #061;-->=<--<br>& #062;-->><--<br>& #063;-->?<--<br>& #064;-->@<--<br>& #091;-->[<--<br>& #092;-->--<br>& #093;-->]<--<br>& #094;-->^<--<br>& #095;-->_<--<br>& #096;--> ' <--<br>& #123;-->{<--<br>& #124;-->|<--<br>& #125;-->}<--<br>& #126;-->~<--<br>& #160;--> <--this is a space that is not ignored in the first character of the XML<br>& #161;-->¡<--<br>& #162;-->¢<--<br>& #163;-->£<--<br>& #164;-->¤<--<br>& #165;-->¥<--<br>& #166;-->¦<--<br>& #167;-->§<--<br>& #168;-->¨<--<br>& #169;-->©<--<br>& #170;-->ª<--<br>& #171;-->«<--<br>& #172;-->¬<--<br>& #173;--><--<br>& #174;-->®<--<br>& #175;-->¯<--<br>& #176;-->°<--<br>& #177;-->±<--<br>& #178;-->²<--<br>& #179;-->³<--<br>& #180;-->´<--<br>& #181;-->µ<--<br>& #182;-->¶<--<br>& #183;--> <--<br>& #184;-->¸<--<br>& #185;-->¹<--<br>& #186;-->º<--<br>& #187;-->»<--<br>& #188;-->¼<--<br>& #189;-->½<--<br>& #190;-->¾<--<br>& #191;-->¿<--<br>& #192;-->à<--<br>& #193;-->á<--<br>& #194;-->â<--<br>& #195;-->ã<--<br>& #196;-->ä<--<br>& #197;-->å<--<br>& #198;-->æ<--<br>& #199;-->ç<--<br>& #200;-->è<--<br>& #201;-->é<--<br>& #202;-->ê<--<br>& #203;-->ë<--<br>& #204;-->ì<--<br>& #205;-->í<--<br>& #206;-->î<--<br>& #207;-->ï<--<br>& #208;-->ð<--<br>& #209;-->ñ<--<br>& #210;-->ò<--<br>& #211;-->ó<--<br>& #212;-->ô<--<br>& #213;-->õ<--<br>& #214;-->ö<--<br>& #215;-->x<--<br>& #216;-->ø<--<br>& #217;-->ù<--<br>& #218;-->ú<--<br>& #219;-->û<--<br>& #220;-->ü<--<br>& #221;-->ý<--<br>& #222;-->þ<--<br>& #223;-->ß<--<br>& #224;-->à<--<br>& #225;-->á<--<br>& #226;-->â<--<br>& #227;-->ã<--<br>& #228;-->ä<--<br>& #229;-->å<--<br>& #230;-->æ<--<br>& #231;-->ç<--<br>& #232;-->è<--<br>& #233;-->é<--<br>& #234;-->ê<--<br>& #235;-->ë<--<br>& #236;-->ì<--<br>& #237;-->í<--<br>& #238;-->î<--<br>& #239;-->ï<--<br>& #240;-->ð<--<br>& #241;-->ñ<--<br>& #242;-->ò<--<br>& #243;-->ó<--<br>& #244;-->ô<--<br>& #245;-->õ<--<br>& #246;-->ö<--<br>& #247;-->÷<--<br>& #248;-->ø<--<br>& #249;-->ù<--<br>& #250;-->ú<--<br>& #251;-->û<--<br>& #252;-->ü<--<br>& #253;-->ý<--<br>& #254;-->þ<--<br>& #255;-->ÿ<--<br>& #256;-->ā<--<br>& #257;-->ā<--<br>& #258;-->?<--<br>& #259;-->?<--<br>& #260;-->?<--<br>& #261;-->?<--<br>& #262;-->?<--<br>& #263;-->?<--<br>& #264;-->?<--<br>& #265;-->?<--<br>& #266;-->?<--<br>& #267;-->?<--<br>& #268;-->?<--<br>& #269;-->?<--<br>& #270;-->?<--<br>& #271;-->?<--<br>& #272;-->?<--<br>& #273;-->?<--<br>& #274;-->ē<--<br>& #275;-->ē<--<br>& #276;-->?<--<br>& #277;-->?<--<br>& #278;-->?<--<br>& #279;-->?<--<br>& #280;-->?<--<br>& #281;-->?<--<br>& #282;-->ě<--<br>& #283;-->ě<--<br>& #284;-->?<--<br>& #285;-->?<--<br>& #286;-->?<--<br>& #287;-->?<--<br>& #288;-->?<--<br>& #289;-->?<--<br>& #290;-->?<--<br>& #291;-->?<--<br>& #292;-->?<--<br>& #293;-->?<--<br>& #294;-->?<--<br>& #295;-->?<--<br>& #296;-->?<--<br>& #297;-->?<--<br>& #298;-->ī<--<br>& #299;-->ī<--<br>& #300;-->?<--<br>& #301;-->?<--<br>& #302;-->?<--<br>& #303;-->?<--<br>& #304;-->?<--<br>& #305;-->?<--<br>& #306;-->?<--<br>& #307;-->?<--<br>& #308;-->?<--<br>& #309;-->?<--<br>& #310;-->?<--<br>& #311;-->?<--<br>& #312;-->?<--<br>& #313;-->?<--<br>& #314;-->?<--<br>& #315;-->?<--<br>& #316;-->?<--<br>& #317;-->?<--<br>& #318;-->?<--<br>& #319;-->?<--<br>& #320;-->?<--<br>& #321;-->?<--<br>& #322;-->?<--<br>& #323;-->?<--<br>& #324;-->ń<--<br>& #325;-->?<--<br>& #326;-->?<--<br>& #327;-->?<--<br>& #328;-->ň<--<br>& #329;-->?<--<br>& #330;-->?<--<br>& #331;-->?<--<br>& #332;-->ō<--<br>& #333;-->ō<--<br>& #334;-->?<--<br>& #335;-->?<--<br>& #336;-->?<--<br>& #337;-->?<--<br>& #338;-->œ<--<br>& #339;-->œ<--<br>& #340;-->?<--<br>& #341;-->?<--<br>& #342;-->?<--<br>& #343;-->?<--<br>& #344;-->?<--<br>& #345;-->?<--<br>& #346;-->?<--<br>& #347;-->?<--<br>& #348;-->?<--<br>& #349;-->?<--<br>& #350;-->?<--<br>& #351;-->?<--<br>& #352;-->š<--<br>& #353;-->š<--<br>& #354;-->?<--<br>& #355;-->?<--<br>& #356;-->?<--<br>& #357;-->?<--<br>& #358;-->?<--<br>& #359;-->?<--<br>& #360;-->?<--<br>& #361;-->?<--<br>& #362;-->ū<--<br>& #363;-->ū<--<br>& #364;-->?<--<br>& #365;-->?<--<br>& #366;-->?<--<br>& #367;-->?<--<br>& #368;-->?<--<br>& #369;-->?<--<br>& #370;-->?<--<br>& #371;-->?<--<br>& #372;-->?<--<br>& #373;-->?<--<br>& #374;-->?<--<br>& #375;-->?<--<br>& #376;-->ÿ<--<br>& #377;-->?<--<br>& #378;-->?<--<br>& #379;-->?<--<br>& #380;-->?<--<br>& #381;-->?<--<br>& #382;-->?<--<p><p>Android special characters</p></p></span>