Skip to content

Commit 2f084ee

Browse files
authored
Update README.md
1 parent 1cfb570 commit 2f084ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,14 @@ A listener that allows you to detect when the answer for a question is changed.
479479
```java
480480
multipleChoiceQuestion.addOnAnswerChangedListener(new OnAnswerChangedListener() {
481481
@Override
482-
public void onAnswerChanged(int i) {
482+
public void onAnswerChanged(int selectedAnswerIndex, String selectedAnswerText) {
483483

484484
}
485485

486486
@Override
487-
public void onAnswerChanged(ArrayList<Integer> arrayList) {
487+
public void onAnswerChanged(ArrayList<Integer> listOfSelectedAnswerIndexes) {
488488

489489
}
490490
});
491491
```
492-
It may say `int i` and `ArrayList<Integer> arraylist`, or `int answer` and `ArrayList<Integer> answer`. The `ArrayList answer` is used for a MultipleAnswerQuestion, as the index for all the selected answers are added into the ArrayList (the index starts at 1, NOT 0). The `int answer` is used for YesOrNoQuestions and MultipleChoiceQuestions, the int is set to the index of the selected answer (the index starts at 1, NOT 0).
492+
DISCLAIMER: The names of the variables may not be correct when you implement this listener into your app. All indexes used in this interface start at 1.

0 commit comments

Comments
 (0)