You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
app:question_title="Which equations are equivalent to 90 + 30"
371
+
app:question_number="10"
372
+
app:number_enabled="true"
373
+
app:option_text_size="20"
374
+
app:question_text_size="25"
375
+
app:spacing_between_boxes="30"
376
+
app:checkbox_orientation="full_vertical"
377
+
app:option_1="91 + 29"
378
+
app:option_2="50 + 70"
379
+
app:option_3="100 + 20"
380
+
app:option_4="99 + 890980"/>
381
+
```
382
+
383
+
## Number Enabled
384
+
The `number_enabled` attribute allows you to make the number visible or not.
385
+
386
+
## Spacing Between Boxes
387
+
The `spacing_between_boxes` attribute allows you to choose the spacing between the checkboxes.
388
+
389
+
## Checkbox Location
390
+
The `checkbox_location` attribute allows you to choose whether the checkboxes are to the left, center, or right of the screen. To specify where they are just use `app:checkbox_location="left"`, `app:checkbox_location="center"`, or`app:checkbox_location="right"`.
391
+
392
+
## Checkbox Orientation
393
+
The `checkbox_orientation` attribute allows you to choose whether the checkboxes are stacked or if they are horizontal. To stack them use `app:checkbox_orientation="split_vertical"` to use the horizontally use `app:checkbox_orientation="horizontal"`
394
+
395
+
## Question Number
396
+
The `question_number` attribute allows you to set the number of the question.
397
+
398
+
## Question Title
399
+
The `question_title` attribute allows you to set the question text.
400
+
401
+
## Question Text Size
402
+
The `question_text_size` attribute allows you to set the question text size.
403
+
404
+
## Option Text Size
405
+
The `option_text_size` attribute allows you to set the option text size.
406
+
407
+
## Options
408
+
The `option_1` attribute lets you set the text for option 1.
409
+
The `option_2` attribute lets you set the text for option 2.
410
+
The `option_3` attribute lets you set the text for option 3.
411
+
The `option_4` attribute lets you set the text for option 4.
412
+
413
+
## Methods
414
+
415
+
### `setCheckedOption(String option)`
416
+
Allows you to choose which option is checked using the option text.
417
+
418
+
### `setCheckedOption(int option)`
419
+
Allows you to choose which option is checked using the index of the option (Starts at 1, NOT 0).
420
+
421
+
### `doOnValueChanged(Runnable runnable)`
422
+
Runs a runnable when a new option is selected.
423
+
424
+
### `setCheckboxOrientation(int orientation)`
425
+
Sets the orientation of the checkboxes.
426
+
427
+
### `setQuestionTextSize(float questionTextSize)`
428
+
Sets the textsize of the question.
429
+
430
+
### `setOptionTextSize(float optionTextSize)`
431
+
Sets the textsize for the options.
432
+
433
+
### `getAnswer()`
434
+
Returns an Integer ArrayList of the selected answer.
435
+
436
+
### `setQuestion(String question)`
437
+
Sets the question text.
438
+
364
439
# Questions
365
440
Questions are an object that allow you to make a QuestionList full of Multiple Choice Questions.
366
-
There are 2 constructors for the Question object, which means there are 2 ways to define your Question object
441
+
There are 3 constructors for the Question object, which means there are 2 ways to define your Question object
367
442
368
443
One way:
369
444
```java
@@ -380,6 +455,12 @@ Another way to create a Question is:
380
455
```java
381
456
Question q =newQuestion("What is the slope intercept equation of a line?", "y = mx + b", Question.MULTIPLE_CHOICE_QUESTION, "x = yb + m", "y = mx + b", "m = yx + b", "b = mx + y");
382
457
```
383
-
In this example, the second arg is a string of the correct answer. Everything else stays the same.
384
458
385
-
If there is no answer, the second arg can be set to Question.NO_ANSWER (or 0).
459
+
The final way is:
460
+
```java
461
+
Question q =newQuestion("What is the slope intercept equation of a line?", newArrayList<Integer>(Arrays.asList(1, 2, 3)), Question.MULTIPLE_ANSWER_QUESTION, "x = yb + m", "y = mx + b", "m = yx + b", "b = mx + y");
462
+
```
463
+
464
+
In this example, the second arg is an Integer ArrayList of the correct answers. Everything else stays the same.
465
+
466
+
If there is no answer, the second arg can be set to Question.NO_ANSWER (or 0), or null.
0 commit comments