5.4.3. arrays.xml

In Section 4.5.8, you created a String array resource in the app’s strings.xml file. Technically, all of your app’s resources in the res/values folder can be defined in the same file. However, to make it easier to manage different types of resources, separate files are typically used for each. For example, array resources are normally defined in arrays.xml, colors in colors.xml, Strings in strings.xml and numeric values in values.xml. This app uses three String array resources that are defined in arrays.xml:

regions_list specifies the names of the world regions with their words separated by underscores—these values are used to load image file names from the appropriate folders and as the selected values for the world regions ...

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.