The Food Quiz (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SaadAhmed1122/Kids_learnig_App/llms.txt
Use this file to discover all available pages before exploring further.
FoodActivity) introduces children to common fruits and foods through vibrant picture questions. Each session delivers ten food images in randomised order, with three photograph options to choose from. A correct tap advances the green progress dot row and immediately loads the next question, creating a smooth and rewarding learning loop for young players.
Launching the Food Quiz
FinalmainScreen starts FoodActivity via its fruitsAct() method. The value extra is set to 32, which is outside the sequence range of 1–7 and therefore triggers standalone mode, ending with a ScoringPage.
The Sequence game identifies this category by the name “Food” in its spinner selection logic.
Quiz Data
FoodActivity stores all question and answer resources as int arrays of drawable resource IDs. The layout file is activity_food.
Question Images
| Question # | Drawable |
|---|---|
| 1 | c0 |
| 2 | c1 |
| 3 | c2 |
| 4 | c3 |
| 5 | c4 |
| 6 | c5 |
| 7 | c6 |
| 8 | c7 |
| 9 | c8 |
| 10 | c9 |
Correct Answers
Option positions:0 = left, 1 = middle, 2 = right.
| Question # | Drawable | Correct Option |
|---|---|---|
| 1 | c0 | Left (0) |
| 2 | c1 | Right (2) |
| 3 | c2 | Left (0) |
| 4 | c3 | Middle (1) |
| 5 | c4 | Left (0) |
| 6 | c5 | Right (2) |
| 7 | c6 | Middle (1) |
| 8 | c7 | Right (2) |
| 9 | c8 | Left (0) |
| 10 | c9 | Middle (1) |
Question Flow
Randomise Queue
random_number_generator() shuffles indices 0–9 into queue[] so every game session presents questions in a different order.Show Question
displayquestion() sets the question ImageView to questions[queue[counter]] and loads three option images from answers[queue[counter]].Tap to Answer
All three option cards share the
onClickCard(View) click listener. Any tap triggers condition().Check Answer
condition() evaluates which LinearLayout was tapped against correct_answer[queue[counter]]:- Correct —
correct_ans_count++, next green dot lights,displayquestion()called. - Wrong —
wrong_ans_count++, tapped option’sLinearLayoutis set toGONE.
Scoring & Feedback
Correct Tap
correct_ans_count increments and the corresponding green dot (grenc1–grenc10) illuminates. The next question loads instantly.Wrong Tap
wrong_ans_count increments and the tapped option disappears. The remaining one or two options stay visible so the child can keep trying.Sequence Mode
Running Food Quiz inside a Sequence
Running Food Quiz inside a Sequence
When the Sequence game starts
FoodActivity with a value of 1–7, the activity calls finish() on completion instead of launching ScoringPage. The show_mark(int count) method is called on launch to overlay checkmark images on the progress dots for steps already finished earlier in the current sequence run.