July 2015
Beginner to intermediate
600 pages
18h 59m
English
Let’s get back to the bug you found at the end of Chapter 2. Run GeoQuiz, press the Next button to reveal the second question, and then rotate the device. (On the emulator, press Fn+Control+F12/Ctrl+F12 to rotate.)
After rotating, GeoQuiz will display the first question again. Check LogCat to see what has happened. Your output should look like Figure 3.8.
Figure 3.8 QuizActivity is dead. Long live QuizActivity!
When you rotated the device, the instance of QuizActivity that you were looking at was destroyed, and a new one was created. Rotate the device again to witness another round ...
Read now
Unlock full access