Slaine82
Newbie
Hi all,
I am new to Android development and I am looking for some advice/help. I am building a quiz application with ten multiple choice questions, so they have a question stem, three radio buttons and a submit button. The way I had thought of setting up the answers to populate the radio buttons was setting up a multi-dimensional array, and pull that in from the resources:-
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="qAnswers">
<item>
<item>Q1Answer1</item>
<item>Q1Answer1</item>
<item>Q1Answer1</item>
</item>
<item>
<item>Q2Answer1</item>
<item>Q2Answer2</item>
<item>Q2Answer3</item>
</item>
</array>
</resources>
and then when I pull in this array use something like answersArray[0][0] to attain the Q1Answer1 item. Is this possible or is there any other suggestions on a better way to do this. Much appreciated.
I am new to Android development and I am looking for some advice/help. I am building a quiz application with ten multiple choice questions, so they have a question stem, three radio buttons and a submit button. The way I had thought of setting up the answers to populate the radio buttons was setting up a multi-dimensional array, and pull that in from the resources:-
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="qAnswers">
<item>
<item>Q1Answer1</item>
<item>Q1Answer1</item>
<item>Q1Answer1</item>
</item>
<item>
<item>Q2Answer1</item>
<item>Q2Answer2</item>
<item>Q2Answer3</item>
</item>
</array>
</resources>
and then when I pull in this array use something like answersArray[0][0] to attain the Q1Answer1 item. Is this possible or is there any other suggestions on a better way to do this. Much appreciated.