Android Development experience Sharing (3)

Source: Internet
Author: User

1 in the layout of the time has been encountered a problem: the previous time when the project was created with a title bar, the actual project to hide the title bar, the Android application development Daquan See this solution: in the configuration file Androidmanifest.xml include the following tags < Android:theme= "@android: Style/theme.notitlebar" >

2 Today, a problem is encountered: in the string.xml to enter such a character

But there was a mistake like this:

Like ' + ' sign, phone numbers starting with this prefix is considered

International numbers if unsure,choose the default value

Error:apostrophe not preceded by

Then Baidu a bit: The reason for the error is because there is no escape, at first thought is + No escape, later only to understand is ' + ' where the ' quotation marks are not escaped later on Csdn found such an article;

http://cache.baiducontent.com/c?m= 9d78d513d9901df918b0cf281a16a6275f14db3f69c0d06468a2965fe0174c37477194bc3365505adc9f3a2143b8482ff7ed662c6a5637b7ec99c91c8 1ac925f73df61292e4bd112469404fc8b007e907ec747bff85fb4e1ae738ea4d1d6da5259ca&p= 8b2a971b86cc42ae5cf7d4644a4dcb&newp=9c57e71385cc43f708e2977f090a9d231610db2151d1d31327&user=baidu& Fm=sc&query=android+string+%d7%aa%d2%e5&qid=&p1=1

Later the code was modified: Add a special escape symbol and \ on it.

The code is perfectly resolved as follows:

<string name= "Lb_verify_prefix_intro_detail" >like \&apos; + \&apos; Sign, phone numbers starting with this prefix is considered international numbers. If unsure, choose the default value.</string>

In summarizing some of the associated escape symbols:

Don't forget to add the escape character in front of \

XML Escape character
The following is the numeric and string escape character for the XML marker
"(& #34; or &quot;)
' (& #39; or &apos;)
& (& #38; or &amp;)
LT (<) (& #60; or &lt;)
GT (>) (& #62; or &gt;)

Android Development experience Sharing (3)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.