Skip to content

Commit 4752a32

Browse files
authored
Update README.md
1 parent 9f29de9 commit 4752a32

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ Returns an int which is the index of the correct answer (the index starts at 1,
309309
### `isAnswerCorrect()`
310310
Returns a boolean that is true if the selected answer matches the correct answer, and false if it doesn't.
311311

312+
### `setCorrectAnswer(int correctAnswer)`
313+
Sets the correct answer of the question.
314+
312315
# MultipleChoiceQuestions
313316
```xml
314317
<com.aadyad.checkboxquestion.Views.MultipleChoiceQuestion
@@ -406,6 +409,9 @@ Returns an int which is the index of the correct answer (the index starts at 1,
406409
### `isAnswerCorrect()`
407410
Returns a boolean that is true if the selected answer matches the correct answer, and false if it doesn't.
408411

412+
### `setCorrectAnswer(int correctAnswer)`
413+
Sets the correct answer of the question.
414+
409415
# MultipleAnswerQuestions
410416
```xml
411417
<com.aadyad.checkboxquestion.Views.MultipleAnswerQuestion
@@ -492,6 +498,15 @@ Returns the TextView which holds the question text.
492498
### `getQuestionNumberTextView()`
493499
Returns the TextView which holds the question number text.
494500

501+
### `getCorrectAnswer()`
502+
Returns an Integer ArrayList which contains the indexes of the correct answers (the index starts at 1, NOT 0).
503+
504+
### `isAnswerCorrect()`
505+
Returns a boolean that is true if the selected answers matches the correct answer, and false if it doesn't.
506+
507+
### `setCorrectAnswer(ArrayList<Integer> correctAnswer)`
508+
Sets the correct answer of the question.
509+
495510
# Questions
496511
Questions are an object that allow you to make a QuestionList full of Multiple Choice Questions.
497512
There are 3 constructors for the Question object, which means there are 2 ways to define your Question object

0 commit comments

Comments
 (0)