I have a string.xml which contains questions and answers for a quiz game.
string.xml
<string name="question">question</string>
<string name="answer1">answer1</string>
<string name="answer2">answer2</string>
OR
<string name="question">question</string>
<string-array name="answer">
<item>answer1</item>
<item>answer2</item>
</string-array>
In one of the questions I need two different answers to be counted. How to do it? This not working
if (inputanswer == answer1 || answer2) {
do something
}
Aucun commentaire:
Enregistrer un commentaire