R.string to string R.array to array Android

R.string to string Android source code
R.array to string [] Android source code

String s = getResources().getString(R.string.my_string); // Hello world!!
String[] arrayOfStrings = getResources().getStringArray(R.array.my_array); // one, two
<xml version="1.0" encoding="utf-8">
    <string-array name="my_array">
<string name="my_string">Hello world!!</string>
This entry was posted in Android Examples Code, Array,List,Collections and tagged , . Bookmark the permalink.

Comments are closed.