I´m sorry to post such an stupid question, but I cannot solve it by myself.
I´m working on a quiz or something like it with radiogroups and radiobuttons. I´ve made 100 questions in strings.xml and each have name like QA1, QA2 and so on...also the radiobuttons like RGAA1,RGAB1,RGAC1 RGAA2,RGAB2,RGAC2, each question have different text and also the ansvers are different. My question is how to make it in the easiest way to change the questions text and also the answers text by each click on next button....
I´ve made it using if where I have an integer p which is incresing by click and if p==1 then .... setText(QA1) if p==2 setText(QA2) ... I want something like:
if p==1 then setText(R.string.QA "and the number of p")
here is an example:
if (p==1) {
TextView Question = (TextView) findViewById(R.id.Question);
Question.setText(R.string.QA1);
RadioButton RA = (RadioButton) findViewById(R.id.RA);
RA.setText(R.string.RGAA1);
RadioButton RB = (RadioButton) findViewById(R.id.RB);
RB.setText(R.string.RGAB1);
RadioButton RC = (RadioButton) findViewById(R.id.RC);
RC.setText(R.string.RGAC1);
}
thx