Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)
For the More Curious: Espresso and Integration Testing You may wonder why you would not retain every fragment or why fragments a ...
Chapter 21 Unit Testing and Audio Playback A couple of annotations get this code up and running. The @RunWith(AndroidJUnit4.cla ...
Challenge: Playback Speed Control Challenge: Playback Speed Control In this challenge, you will add playback speed control to Be ...
...
22. Styles and Themes Now that BeatBox sounds intimidating, it is time to make it look intimidating, too. So far, BeatBox sticks ...
Chapter 22 Styles and Themes Color Resources Begin by defining a few colors that you will use throughout the chapter. Edit your ...
Styles Listing 22.3 Using a style (res/layout/list_item_sound.xml) <Button style="@style/BeatBoxButton" android:layout_width ...
Chapter 22 Styles and Themes Style inheritance Styles also support inheritance: A style can inherit and override attributes fro ...
Themes Run BeatBox and verify that your button text is indeed bold, as in Figure 22.3. Figure 22.3 A bolder BeatBox Themes Styl ...
Chapter 22 Styles and Themes Modifying the theme When you created BeatBox, it was given a default theme. Navigate to AndroidMan ...
Modifying the theme Theme.AppCompat.Light.DarkActionBar – a light theme with a dark toolbar Change the parent theme to Theme.A ...
Chapter 22 Styles and Themes Adding Theme Colors With the base theme squared away, it is time to customize the attributes of Be ...
Overriding Theme Attributes You will not see the colorAccent attribute affect BeatBox because Buttons do not support tinting. Yo ...
Chapter 22 Styles and Themes Command-click on Base.Theme.AppCompat. Android Studio will tell you that this theme is resource qu ...
Theme spelunking AppCompat library, you do it directly. You would just write Theme.AppCompat, because those files exist in your ...
Chapter 22 Styles and Themes Run BeatBox, scroll down to the bottom of your recycler view, and verify that the background (wher ...
Modifying Button Attributes Modifying Button Attributes Earlier you customized the buttons in BeatBox by manually setting a styl ...
Chapter 22 Styles and Themes Duplicate what happens in Android’s own theme in BeatBox. Change the parent of BeatBoxButton to in ...
For the More Curious: More on Style Inheritance You are now overriding the buttonStyle attribute and substituting your own style ...
Chapter 22 Styles and Themes Specifying the parent theme in the theme name only works for themes that exist in the same package ...
«
18
19
20
21
22
23
24
25
26
27
»
Free download pdf