Please help I am new to java and android.
Here is the example of the string array resource
strings.xml
<resources>
<string-array name="dance_steps">
<item>Step1</item>
<item>Step2</item>
<item>Step3</item>
<item>Step4</item>
</string-array>
</resources>
How can I get the Strings and put it on different TextView
in the java code?
TextView step1, step2, step3, step4;
step1 = (TextView) findViewById(R.id.textview1);
step2 = (TextView) findViewById(R.id.textview2);
step3 = (TextView) findViewById(R.id.textview3);
step4 = (TextView) findViewById(R.id.textview4);
Resources res = getResources();
String[] steps = res.getStringArray(R.array.dance_steps);
step1.setText(item number 1 in String Array);
step2.setText(item number 2 in String Array);
step3.setText(item number 3 in String Array);
step4.setText(item number 4 in String Array);
Thankyou.