5.6.2. Fields

Figure 5.26 lists class QuizFragment’s static and instance variables. The constant TAG (line 38) is used when we log error messages using class Log (Fig. 5.31) to distinguish this Activity’s error messages from others that are being written to the device’s log. The constant FLAGS_IN_QUIZ (line 40) represents the number of flags in the quiz.

Variable fileNameList (line 42) holds the flag image file names for the currently enabled geographic regions. Variable quizCountriesList (line 43) holds the flag file names for the countries used in the current quiz. Variable regionsSet (line 44) stores the geographic regions that are enabled.

Variable correctAnswer (line 45) holds the flag file name for the current flag’s correct answer. Variable ...

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.