Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)
Logging the Activity Lifecycle Logging the Activity Lifecycle In this section, you are going to override lifecycle methods to ea ...
Chapter 3 The Activity Lifecycle Now override five more methods in QuizActivity by adding the following after onCreate(Bundle): ...
Using Logcat The parent AppCompatActivity class does not have an onCreat(Bundle) method, so the compiler will complain. This way ...
Chapter 3 The Activity Lifecycle In the filter dropdown, select Edit Filter Configuration to create a new filter. Name the filt ...
Exploring the activity lifecycle by example When you pressed the Back button, you told Android, “I’m done with this activity, an ...
Chapter 3 The Activity Lifecycle Each card in the overview screen represents an app the user has interacted with in the past (F ...
Rotation and the Activity Lifecycle Rotation and the Activity Lifecycle Let’s get back to the bug you found at the end of Chapte ...
Chapter 3 The Activity Lifecycle Creating a landscape layout In the project tool window, right-click the res directory and sele ...
Device configurations and alternative resources Finally, ensure that Landscape is selected in the Screen orientation dropdown, a ...
Chapter 3 The Activity Lifecycle Now make some changes to the landscape layout so that it is different from the default. Figure ...
Device configurations and alternative resources Open layout-land/activity_quiz.xml and make the necessary changes using Figure 3 ...
Chapter 3 The Activity Lifecycle Run GeoQuiz again. Rotate the device to landscape to see the new layout (Figure 3.13). Of cour ...
Overriding onSaveInstanceState(Bundle) When you override onCreate(Bundle), you call onCreate(Bundle) on the activity’s superclas ...
Chapter 3 The Activity Lifecycle Finally, in onCreate(Bundle), check for this value. If it exists, assign it to mCurrentIndex. ...
The Activity Lifecycle, Revisited Figure 3.14 The complete activity lifecycle When your activity is stashed, an Activity object ...
Chapter 3 The Activity Lifecycle For the More Curious: Current State of Activity Cleanup As of this writing, activities themsel ...
For the More Curious: Log Levels and Methods Now run your app and press the Home button. Pressing Home causes the activity to be ...
Chapter 3 The Activity Lifecycle Challenge: Preventing Repeat Answers Once a user provides an answer for a particular question, ...
4. Debugging Android Apps In this chapter, you will find out what to do when apps get buggy. You will learn how to use Logcat, A ...
Chapter 4 Debugging Android Apps Run GeoQuiz and see what happens. Figure 4.1 shows the message that appears when your app cras ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf