Android See recruit split five: XML matching problem, the necessity of XML resource reference

Source: Internet
Author: User
Tags processing instruction

The processing instruction target matching "[Xx][mm][ll]" is not allowed.

Problem description

Causes and Solutions

The first line of XML is not written and the second line is written directly, and a blank line or space in front of the XML will result in a matching error.

[i18n] hardcoded string "3", should use @string resource

Problem description

Causes and Solutions

android:text= "123313"

The direct write can also be displayed normally, but a warning prompt will appear with the @string reference

The advantage of quoting is that it can be changed completely and is also useful in supporting multiple languages.

In addition, the setting of the color is preferably similar to the setting in COLOR.XM.

The right usage

android:text= "@string/123313"

and declare it in Strings.xml.

<string name= "123313" > Test block 33</string>

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.