Skip to content

Instantly share code, notes, and snippets.

@itoz
Created July 5, 2011 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itoz/1064234 to your computer and use it in GitHub Desktop.
Save itoz/1064234 to your computer and use it in GitHub Desktop.
Android リソースの配列を取得
/**
ex)
<string-array name="entries0">
<item>値1</item>
<item>値2</item>
<item>値3</item>
<item>値4</item>
</string-array>
*/
String[] array =getResources().getStringArray(R.array.entries0);
int max = array.length;
for (int i = 0; i < max; i++) {
Log.v("tag", String.valueOf("------" + array[i]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment