Use multiple string resource files

Description

To see that multiple string resource files are allowed in this subdirectory, you can place another file with the following content in the same subdirectory and call it strings1.xml.

Example

We can have one string resourde defined as follows.


<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">hello</string>
    <string name="app_name">hello appname</string>
</resources>

Example of an Additional strings.xml File.


<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello1">hello 1</string>
    <string name="app_name1">hello appname 1</string>
</resources>

The Eclipse ADT plug-in validates the uniqueness of these IDs at compile time and places them in R.java as two additional constants: R.string.hello1 and R.string.app_name1.





















Home »
  Android »
    Android Basics »




Hello Android
Resources
Activity
Calendar
Camera
Contact
Content Provider
Database
Hardware
Intent
Location
Media
Network
Notification
Preference
Sensor
Service
SMS