Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a collection from res/values/arrays.xml?

Tags:

android

How to create a collection from res/values/arrays.xml:

<resources>
<string-array name="select_dialog_items">
    <item>Start</item>
    <item>Stop</item>
    <item>Delete</item>
</string-array>
</resources>
like image 733
Eugene Avatar asked Mar 20 '11 20:03

Eugene


1 Answers

Assuming that this is your Activity...

String[] data = this.getResources().getStringArray(R.array.select_dialog_items);
like image 97
Olegas Avatar answered Oct 23 '22 13:10

Olegas