Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)
23. XML Drawables Now that BeatBox has been themed, it is time to do something about those buttons. Currently, the buttons do no ...
Chapter 23 XML Drawables Making Uniform Buttons Before creating any XML drawables, modify list_item_sound.xml. Listing 23.1 Sp ...
Shape Drawables Figure 23.2 Spaced-out buttons Shape Drawables Now, make your buttons round with a ShapeDrawable. Since XML dra ...
Chapter 23 XML Drawables Apply button_beat_box_normal as the background for your buttons. Listing 23.3 Modifying the backgroun ...
State List Drawables State List Drawables To fix this, first define a new shape drawable that will be used for the pressed state ...
Chapter 23 XML Drawables Run BeatBox and press a button. The button’s background changes (Figure 23.4). Pretty slick, right? Fi ...
Layer List Drawables Layer List Drawables BeatBox is looking good. You now have round buttons and they visually respond to press ...
Chapter 23 XML Drawables Run BeatBox and press on a button or two. You will see a nice ring around the pressed interface (Figur ...
For the More Curious: Mipmap Images For the More Curious: Mipmap Images Resource qualifiers and drawables are handy. When you ne ...
Chapter 23 XML Drawables For the More Curious: 9-Patch Images Sometimes (or maybe often), you will fall back to regular old ima ...
For the More Curious: 9-Patch Images In the solutions for this chapter (see the section called Adding an Icon in Chapter 2), you ...
Chapter 23 XML Drawables Why are they called 9-patches? A 9-patch breaks your image into a three-by-three grid – a grid with ni ...
For the More Curious: 9-Patch Images In the 9-patch editor, first check the Show patches option to make your patches more visibl ...
Chapter 23 XML Drawables Repeat the process with the pressed version. Run BeatBox to see your new 9-patch image in action (Figu ...
For the More Curious: 9-Patch Images Use the content area to center the text within the buttons. Go back to ic_button_beat_box_d ...
Chapter 23 XML Drawables Run BeatBox to see your nicely centered text (Figure 23.13). Figure 23.13 New and more improved Try r ...
24. More About Intents and Tasks In this chapter, you will use implicit intents to create a launcher app to replace Android’s de ...
Chapter 24 More About Intents and Tasks Setting Up NerdLauncher Create a new Android application project named NerdLauncher. Se ...
Setting Up NerdLauncher Finally, add a new class named NerdLauncherFragment that extends from android.support.v4.app.Fragment. A ...
Chapter 24 More About Intents and Tasks Resolving an Implicit Intent NerdLauncher will show the user a list of launchable apps ...
«
19
20
21
22
23
24
25
26
27
28
»
Free download pdf