5.2.3. Taking the Quiz

A new quiz starts with the number of answer choices you selected and flags from only the North America region. Work through the quiz by touching the guess Button for the country that you think matches each flag.

Making a Correct Selection

If the choice is correct (Fig. 5.5(a)), the app disables all the answer Buttons and displays the country name in green followed by an exclamation point at the bottom of the screen (Fig. 5.5(b)). After a short delay, the app loads the next flag and displays a new set of answer Buttons.

Image

a) Choosing the correct answer

Image

b) Correct answer displayed

Fig. 5.5 | User choosing the correct answer and the correct answer displayed.

User Making an Incorrect Selection

If you select incorrectly (Fig. 5.6(a)), the app disables the corresponding country name Button, uses an animation to shake the flag and displays Incorrect! in red at the bottom of the screen (Fig. 5.6(b)). Keep guessing until you get the correct answer for that flag.

Image

a) Choosing an incorrect answer

Image

b) Incorrect! displayed

Fig. 5.6 | Disabled incorrect answer in the Flag Quiz app.

Completing the Quiz

After you select the 10 correct country names, a popup AlertDialog displays over the app and shows your total number of guesses and the percentage of correct answers (Fig. 5.7). When you touch the dialog’s Reset Quiz Button, a new quiz begins based on the current quiz options.

Image

Fig. 5.7 | Results displayed after quiz completion.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset