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 Transport Quiz (TravelAct) takes children on a picture-based journey through vehicles and travel modes from around the world. Each of the ten questions displays a transport image and three answer choices; tapping a card triggers instant visual feedback. Correct picks earn a green dot, wrong ones vanish from view, and after all ten questions the app either shows a star-rated score (standalone mode) or hands control to the next category in a Sequence Game chain.

Launching the Activity

TravelAct is started from FinalmainScreen by calling travelAct(). The Intent extra value signals whether the session is standalone (72) or part of a Sequence Game (17).
Intent ii = new Intent(FinalmainScreen.this, TravelAct.class);
ii.putExtra("value", 72);
startActivity(ii);
When value is 17, the activity is running inside a Sequence Game chain. It calls finish() on completion instead of launching ScoringPage, passing control automatically to the next selected category.

Layout

PropertyValue
Layout fileactivity_travel
Packagecom.kidsapp.fiver1
Java classTravelAct
Sequence category label"Transport"

Question Bank

Ten transport drawable images (t0t9) make up the question pool. Each question is paired with three option drawables and a single correct answer index.

Questions Array

Drawable IDs t0 through t9 — one vehicle or travel-mode image per question, loaded from res/drawable.

Options Array

answers[10][3] — three drawable option IDs per question, displayed as tappable image cards side-by-side.

Correct Answer Key

Question indexDrawableCorrect option index
0t00 (first card)
1t12 (third card)
2t20 (first card)
3t31 (second card)
4t40 (first card)
5t52 (third card)
6t61 (second card)
7t72 (third card)
8t80 (first card)
9t91 (second card)

How a Round Plays

1

Shuffle

random_number_generator() populates queue[] with a randomised order of the ten question indices, ensuring no two sessions feel identical.
2

Display question

displayquestion() renders the current transport drawable in the question view and loads the three option images into their respective ImageView cards.
3

Child taps a card

onClickCard(View) fires and forwards to condition(), which compares the tapped card’s position index against correct_answer[current].
4

Feedback

A correct tap reveals a green dot overlay on that card. A wrong tap hides that option’s LinearLayout, gently reducing the choices for the child.
5

Advance

After a correct answer the next index from queue[] is loaded via displayquestion(). This repeats until all ten questions are answered.
6

Finish

In standalone mode (seq == 0), ScoringPage launches with Wrong = wrong_ans_count. In sequence mode (seq 17), finish() is called and the chain continues.

Feedback Behaviour

Wrong Answer

The selected option’s LinearLayout is set to GONE, narrowing the visible choices without interrupting the game flow.

Correct Answer

A green dot indicator appears on the correct card before the activity advances to the next question automatically.
The Transport category covers a wide range of vehicles — land, sea, and air — making it an excellent pairing with the Animals or Shapes categories in a Sequence Game to keep sessions varied and engaging.

End-of-Quiz Logic

if (seq == 0) {
    Intent intent = new Intent(TravelAct.this, ScoringPage.class);
    intent.putExtra("Wrong", wrong_ans_count);
    startActivity(intent);
} else {
    finish();
}
See the Scoring page for how Wrong maps to star ratings, and the Sequence Game page for how the Sequence chain is constructed and how seq values are assigned.

Build docs developers (and LLMs) love