Thursday, February 6, 2014

The use of android strings.xml


            
android white, lower values ​​strings.xml files automatically generates a file, which can be modified in the app's name, but the program is how the search "app_name" it? If there are several values ​​below the xml file, is it a file to traverse a file to see if there is no "app_name" label?
Or that the internal procedures specified default search strings.xml in?
Reply:
You open the project file is generally able to see a lot of different languages ​​strings.xml under such zh_CN en_US etc.
And inside the string will generate index id should be to select files based on the current language
Reply:
cited a floor tanwei4199 reply:
you open the project file strings.xml generally see a lot of different languages ​​under such zh_CN en_US etc.
And inside the string will generate index id should be selected based on the current language file

The values ​​folder only one strings.xml file, and I see online some items folder in values ​​are all below their definition of the xml file, there is no strings.xml, so I think it is not, this is not a xml file You can easily define your own, as long as the string inside the name is unique, the program will find all of the xml file, what name is unrelated to the xml file.
Reply:
cited landlord u010581992 reply: under
android white, values ​​strings.xml files automatically generates a file, which can be modified in the app's name, but the program is how the search "app_name" it? If there are several values ​​below the xml file, is it a file to traverse a file to see if there is no "app_name" label?
Or that the internal procedures specified default search strings.xml in?


strings.xml is used to define a fixed format strings in different languages ​​such as LS said xml can define different vlaues packages under a single package must be strings.xml, arrays.xml, bools.xml, styles.xml, colors. different role each xml xml, dimensions.xml etc.

For example, to find "app_name" android is through R.java corresponding app_name named id find the appropriate resource xml file content is displayed to the interface
Reply:
I will certainly be used to specify where the name with which xml tag, such as use string.xml tag is written in the testName android: text = "@ string / testName"
Reply:
reference to the third floor ConnectionUtils reply:
Quote: references landlord u010581992 reply:

android white, lower values ​​strings.xml files automatically generates a file, which can be modified in the app's name, but the program is how the search "app_name" it? If there are several values ​​below the xml file, is it a file to traverse a file to see if there is no "app_name" label?
Or that the internal procedures specified default search strings.xml in?


strings.xml is used to define a fixed format strings in different languages ​​such as LS said xml can define different vlaues packages under a single package must be strings.xml, arrays.xml, bools.xml, styles.xml, colors. different role each xml xml, dimensions.xml etc.

For example, to find "app_name" android is through R.java corresponding app_name named id find the appropriate resource xml file content display to interface
strings.xml can then delete? Or that I renamed, for example f_strings.xml, because I see some of the items did not strings.xml, are xml own definition.
Reply:
LZ strings.xml can delete or change the file name, but other formats are certain

xxx
Also you can pay attention to other formats such as style theme and so long as the format to meet the requirements can be indexed to the file name so do not tangle

No comments:

Post a Comment