Android Programming The Big Nerd Ranch Guide, 3rd Edition
Two approaches to hosting 137 Two approaches to hosting You have two options when it comes to hosting a UI fragment in an activi ...
Chapter 7 UI Fragments and the Fragment Manager 138 Note that while activity_crime.xml consists solely of a container view for ...
Creating a UI Fragment 139 Creating a UI Fragment The steps to create a UI fragment are the same as those you followed to create ...
Chapter 7 UI Fragments and the Fragment Manager 140 When the file opens, navigate to the XML. The wizard has added the LinearLa ...
Defining CrimeFragment’s layout 141 Check the Design view to see a preview of your fragment’s view (Figure 7.14). Figure 7.14 P ...
Chapter 7 UI Fragments and the Fragment Manager 142 Creating the CrimeFragment class Right-click the com.bignerdranch.android.c ...
Creating the CrimeFragment class 143 Implementing fragment lifecycle methods CrimeFragment is a controller that interacts with m ...
Chapter 7 UI Fragments and the Fragment Manager 144 Also, note what does not happen in Fragment.onCreate(Bundle): You do not in ...
Creating the CrimeFragment class 145 Wiring widgets in a fragment You are now going to hook up the EditText, Checkbox, and Butto ...
Chapter 7 UI Fragments and the Fragment Manager 146 Next, connect the Button to display the date of the crime, as shown in List ...
Creating the CrimeFragment class 147 After typing in the code as above, click on OnCheckedChangeListener: mSolvedCheckBox.setOnC ...
Chapter 7 UI Fragments and the Fragment Manager 148 Adding a UI Fragment to the FragmentManager When the Fragment class was int ...
Fragment transactions 149 Fragment transactions Now that you have the FragmentManager, add the following code to give it a fragm ...
Chapter 7 UI Fragments and the Fragment Manager 150 A container view ID serves two purposes: It tells the FragmentManager wher ...
Fragment transactions 151 CrimeActivity is now hosting a CrimeFragment. Run CriminalIntent to prove it. You should see the view ...
Chapter 7 UI Fragments and the Fragment Manager 152 The FragmentManager and the fragment lifecycle Now that you know about the ...
Application Architecture with Fragments 153 Application Architecture with Fragments Designing your app with fragments the right ...
Chapter 7 UI Fragments and the Fragment Manager 154 The reason all our activities will use fragments From here on, all of the a ...
For the More Curious: Fragments and the Support Library 155 For the More Curious: Fragments and the Support Library In this chap ...
Chapter 7 UI Fragments and the Fragment Manager 156 For the More Curious: Why Support Fragments Are Superior This book uses the ...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf