Skip to main content

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.

The Colors and Shapes Quiz (Colours_question_act) builds early visual literacy by asking children to match color swatches and geometric shapes displayed as full-screen photographs. Ten questions are served in randomised order, each offering three picture choices. A tap on the correct image lights up the next progress dot and moves straight to the following question, keeping young learners engaged without interruption.

Launching the Colors & Shapes Quiz

FinalmainScreen starts the Colors and Shapes Quiz through its showcoloract() method. A value of 12 is supplied, which falls outside the sequence range of 1–7, so the activity runs in standalone mode and presents a ScoringPage when all ten questions are answered.
// FinalmainScreen.java — showcoloract()
Intent ii = new Intent(FinalmainScreen.this, Colours_question_act.class);
ii.putExtra("value", 12);
startActivity(ii);
In the Sequence game spinner this category is listed as “Shapes”, not “Colors”. When building sequence flows make sure to reference the category by that label.

Quiz Data

Colours_question_act stores questions and options as int arrays of drawable resource IDs. The layout file is activity_colours_question_act.

Question Images

The drawable names follow a grouped naming convention reflecting the three color/shape families used in the quiz.
Question #Drawable
1h0
2h1
3h2
4h3
5h10
6h11
7h12
8h20
9h21
10h22

Correct Answers

correct_answer[] values map option positions: 0 = left, 1 = middle, 2 = right.
int[] correct_answer = {0, 2, 2, 0, 0, 0, 2, 1, 2, 1};
Question #DrawableCorrect Option
1h0Left (0)
2h1Right (2)
3h2Right (2)
4h3Left (0)
5h10Left (0)
6h11Left (0)
7h12Right (2)
8h20Middle (1)
9h21Right (2)
10h22Middle (1)

Question Flow

1

Shuffle on Launch

random_number_generator() creates a shuffled queue[] of indices 0–9, ensuring a unique question order every session.
2

Display Question

displayquestion() sets the question ImageView to questions[queue[counter]] and populates the three option ImageViews from answers[queue[counter]].
3

Child Taps

onClickCard(View) intercepts every tap and delegates to condition().
4

Evaluate Answer

condition() compares the tapped option against correct_answer[queue[counter]]:
  • Correct — increments correct_ans_count, lights the next green dot, calls displayquestion().
  • Wrong — increments wrong_ans_count, hides the tapped option’s LinearLayout.
5

All Ten Done

When the tenth question is answered correctly the activity launches ScoringPage (standalone) or calls finish() (sequence mode).

Scoring

After ten correct answers Colours_question_act starts ScoringPage and passes the wrong answer count:
Intent in = new Intent(Colours_question_act.this, ScoringPage.class);
in.putExtra("Wrong", wrong_ans_count);
startActivity(in);
The layout contains ten green dot views (grenc1grenc10) that illuminate sequentially as questions are answered correctly, giving children a clear visual sense of how far through the quiz they are. Ten cross ImageViews (crossimg1crossimg10) are used in sequence mode to show which earlier steps are already complete.

Build docs developers (and LLMs) love