What you learn: You will learn how to specify Arrays in an XML-Resource and how to read them out in your code.
Difficulty: 1 of 5
Lets take a look at an practical example, which was used in the AndroidFileBrowser 2.0-Tutorial. There we defined the fileEndings for different file-categories(Audio, Text, Images, ...) in an XML-File to make our Application highly generic
You simply have to create an resource of any name (should and with .xml) in your "res/values/"-Directory.
You can define as many Arrays within each file, as you want with as many items you want.
So that was as easy as one can imagine.
Now we surely want to read those "Text"-Arrays into our application as "Real"-Array o fthe Type String. You can do that with the following single line (also from the FileBrowser-Example):