Android Programming The Big Nerd Ranch Guide, 3rd Edition
Binding List Items 177 Listing 8.21 Pulling out views in the constructor (CrimeListFragment.java) private class CrimeHolder ext ...
Chapter 8 Displaying Lists with RecyclerView 178 Run CriminalIntent one more time, and every visible CrimeHolder should now dis ...
For the More Curious: ListView and GridView 179 Listing 8.24 Detecting presses in CrimeHolder (CrimeListFragment.java) private ...
Chapter 8 Displaying Lists with RecyclerView 180 Singletons are often used in Android because they outlive a single fragment or ...
181 9. Creating User Interfaces with Layouts and Widgets In this chapter, you will learn more about layouts and widgets while ad ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 182 Using the Graphical Layout Tool So far, you have created layout ...
Introducing ConstraintLayout 183 Introducing ConstraintLayout With ConstraintLayout, instead of using nested layouts you add a s ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 184 Using ConstraintLayout Now, convert list_item_crime.xml to use ...
Using ConstraintLayout 185 Finally, you will be asked to add the constraint layout dependency to your project (Figure 9.7). Cons ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 186 The graphical editor Look to the toolbar near the top of the pr ...
The graphical editor 187 Select the ConstraintLayout view in the component tree, then choose the Clear All Constraints option fr ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 188 Making room You need to make some room. Your two TextViews are ...
Making room 189 Table 9.1 View size setting types Setting type Setting value Usage fixed Xdp Specifies an explicit size (that w ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 190 Repeat the process with the crime_date widget to set its width ...
Adding widgets 191 In the pop-up, choose ic_solved as the resource for the ImageView (Figure 9.15). This image will be used to i ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 192 You want the ImageView to be anchored in the right side of the ...
Adding widgets 193 Do the same for the bottom constraint handle, dragging it from the ImageView to the bottom of the root view, ...
Chapter 9 Creating User Interfaces with Layouts and Widgets 194 ConstraintLayout’s inner workings Any edits that you make with ...
...
...
«
6
7
8
9
10
11
12
13
14
15
»
Free download pdf