January 2014
Intermediate to advanced
736 pages
70h 43m
English
Overridden Activity lifecycle method onStart (Fig. 5.20) is called in two scenarios:
• When the app first executes, onStart is called after onCreate. We use onStart in this case to ensure that the quiz is configured correctly based on the app’s default preferences when the app is installed and executes for the first time or based on the user’s updated preferences when the app is launched subsequently.
• When the app is running in portrait orientation and the user opens the SettingsActivity, the MainActivity is paused while the SettingsActivity is displayed. When the user returns to the MainActivity, onStart is called again. We use onStart in this case to ensure that the quiz is reconfigured properly if ...
Read now
Unlock full access