Android Programming The Big Nerd Ranch Guide, 3rd Edition
Editing properties 197 After adding the constraints, adjust the properties of the TextView. You want the width of your date Text ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 198 Run CriminalIntent and verify that you see all three components ...
Making list items dynamic 199 Making list items dynamic Now that the layout includes the right constraints, update the ImageView ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 200 More on Layout Attributes Let’s add a few more tweaks to the de ...
Screen pixel densities and dp and sp 201 Figure 9.28 Dimension units in action on TextView px Short for pixel. One pixel corres ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 202 Margins vs padding In both GeoQuiz and CriminalIntent, you have ...
Styles, themes, and theme attributes 203 Styles, themes, and theme attributes A style is an XML resource that contains attribute ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 204 Android’s design guidelines Notice that for your margins, Andro ...
205 10. Using Fragment Arguments In this chapter, you will get the list and the detail parts of CriminalIntent working together. ...
Chapter 10 Using Fragment Arguments 206 Here CrimeListFragment creates an explicit intent that names the CrimeActivity class. C ...
Putting an extra 207 Putting an extra You can tell CrimeFragment which Crime to display by passing the crime ID as an Intent ext ...
Chapter 10 Using Fragment Arguments 208 Listing 10.4 Retrieving the extra and fetching the Crime (CrimeFragment.java) public c ...
The downside to direct retrieval 209 Run CriminalIntent. Select Crime #4 and watch a CrimeFragment instance with the correct cri ...
Chapter 10 Using Fragment Arguments 210 Fragment Arguments Every fragment instance can have a Bundle object attached to it. Thi ...
Retrieving arguments 211 You can now also make EXTRA_CRIME_ID private, because no other class will access that extra. Listing 10 ...
Chapter 10 Using Fragment Arguments 212 Reloading the List There is one more detail to take care of. Run CriminalIntent, press ...
Reloading the List 213 In CrimeListFragment, override onResume() and trigger a call to updateUI() to reload the list. Modify the ...
Chapter 10 Using Fragment Arguments 214 You have made progress with CriminalIntent in the last two chapters. Let’s take a look ...
Getting Results with Fragments 215 Getting Results with Fragments In this chapter, you did not need a result back from the start ...
Chapter 10 Using Fragment Arguments 216 For the More Curious: Why Use Fragment Arguments? This all seems so complicated. Why no ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf