Strings
|
|
ample, the names of buttons, labels, default text, and similar types of strings go into
this file. This is the best practice for separating the concerns of various files, even if they
are XML files. In other words, layout XML is responsible for the layout of widgets, but
strings XML is responsible for their textual content (see Example 3-3).
|
Example 3-3. res/values/strings.xml
|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, HelloWorld!</string>
<string name="app_name">Hello, World!!!</string>
</resources>
|

Walang komento:
Mag-post ng isang Komento