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 Emotions Quiz (EmoQuestionsActivity) introduces children to a range of human feelings through illustrated flashcard questions. Each round presents one emotion image alongside three picture choices, and the child taps the card they think matches. Correct picks are celebrated with a green dot, while wrong choices are gently hidden so focus stays positive. After all ten questions the app tallies the result and — when played standalone — hands off to the Scoring page for a star-rated reward.

Launching the Activity

EmoQuestionsActivity is started from FinalmainScreen by calling showemoact(). The Intent extra value controls whether the activity runs standalone (17) or as part of a Sequence Game chain (values 17).
Intent ii = new Intent(FinalmainScreen.this, EmoQuestionsActivity.class);
ii.putExtra("value", 17);
startActivity(ii);
When value is between 1 and 7 the activity is running inside a Sequence Game. It calls finish() after the last question instead of launching ScoringPage, so control returns automatically to the next queued category.

Layout

PropertyValue
Layout fileemoquestionact
Packagecom.kidsapp.fiver1
Java classEmoQuestionsActivity
Sequence category label"Emotions"

Question Bank

The activity holds ten drawable-based questions (e0e9). Each question carries three option drawables and one correct answer index (0, 1, or 2).

Questions Array

Drawable IDs e0 through e9 — one image per question, sourced from res/drawable.

Options Array

answers[10][3] — three drawable option IDs for every question, presented as tappable cards.

Correct Answer Key

Question indexDrawableCorrect option index
0e00 (first card)
1e12 (third card)
2e22 (third card)
3e30 (first card)
4e40 (first card)
5e50 (first card)
6e62 (third card)
7e71 (second card)
8e82 (third card)
9e91 (second card)

How a Round Plays

1

Shuffle

random_number_generator() fills queue[] with a randomised order of the ten question indices so every session feels fresh.
2

Display question

displayquestion() loads the current emotion drawable into the question view and populates the three option ImageView cards.
3

Child taps a card

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

Feedback

A correct tap shows a green dot overlay. A wrong tap hides that option’s LinearLayout so the child can try the remaining cards.
5

Advance

After a correct answer the next entry from queue[] is loaded. This repeats until all ten questions are answered.
6

Finish

When seq == 0 (standalone mode), ScoringPage is started with Wrong = wrong_ans_count. When seq is 17, finish() is called and the Sequence Game advances to the next category.

Feedback Behaviour

Wrong Answer

The tapped option’s LinearLayout is set to GONE, narrowing the choices so the child can self-correct without feeling stuck.

Correct Answer

A green dot indicator becomes visible, confirming the right choice before the activity advances to the next question.
Because wrong options are hidden rather than locked, children receive implicit hints and can arrive at the correct answer through elimination — great for early learners who need a bit of extra support.

End-of-Quiz Logic

if (seq == 0) {
    Intent intent = new Intent(EmoQuestionsActivity.this, ScoringPage.class);
    intent.putExtra("Wrong", wrong_ans_count);
    startActivity(intent);
} else {
    finish();
}
See the Scoring page for details on how Wrong is used to award stars, and the Sequence Game page for how the seq value is assigned.

Build docs developers (and LLMs) love