Skip to content

Commit 57d22cb

Browse files
authored
Update README.md
1 parent 1dcb3f1 commit 57d22cb

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ Returns a view that can either be a MultipleChoiceQuestion or YesOrNoQuestion. Y
218218
```java
219219
((MultipleChoiceQuestion) questionList.getQuestion(1)).setCheckedOption(0);
220220
```
221-
### `addOnValueChangedRunnable(int index, Runnable r)`
222-
Adds a runnable to a question retrieved by the index.
221+
### `addOnAnswerChangedListener(int index, OnAnswerChangedListener onAnswerChangedListener)`
222+
A listener which allows you to run code whenever the answer changes, the index is the index of the question in the QuestionList.
223223

224224

225225
# YesOrNoQuestions
@@ -265,6 +265,9 @@ The `option_text_size` attribute allows you to set the option text size.
265265

266266
## Methods
267267

268+
### `addOnAnswerChangedListener(OnAnswerChangedListener onAnswerChangedListener)`
269+
A listener which allows you to run code whenever the answer changes.
270+
268271
### `setCheckedOption(String option)`
269272
Allows you to choose which option is checked using the option text.
270273

@@ -346,8 +349,8 @@ Allows you to choose which option is checked using the option text.
346349
### `setCheckedOption(int option)`
347350
Allows you to choose which option is checked using the index of the option (Starts at 1, NOT 0).
348351

349-
### `doOnValueChanged(Runnable runnable)`
350-
Runs a runnable when a new option is selected.
352+
### `addOnAnswerChangedListener(OnAnswerChangedListener onAnswerChangedListener)`
353+
A listener which allows you to run code whenever the answer changes.
351354

352355
### `setCheckboxOrientation(int orientation)`
353356
Sets the orientation of the checkboxes.
@@ -420,8 +423,8 @@ Allows you to choose which option is checked using the option text.
420423
### `setCheckedOption(int option)`
421424
Allows you to choose which option is checked using the index of the option (Starts at 1, NOT 0).
422425

423-
### `doOnValueChanged(Runnable runnable)`
424-
Runs a runnable when a new option is selected.
426+
### `addOnAnswerChangedListener(OnAnswerChangedListener onAnswerChangedListener)`
427+
A listener which allows you to run code whenever the answer changes.
425428

426429
### `setCheckboxOrientation(int orientation)`
427430
Sets the orientation of the checkboxes.

0 commit comments

Comments
 (0)