Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)
Passing data to DatePickerFragment DatePickerFragment needs to initialize the DatePicker using the information held in the Date. ...
Chapter 12 Dialogs Returning data to CrimeFragment To have CrimeFragment receive the date back from DatePickerFragment, you nee ...
Returning data to CrimeFragment Sending data to the target fragment Now that you have a connection between CrimeFragment and Dat ...
Chapter 12 Dialogs Now it is time to use this new sendResult(...) method. When the user presses the positive button in the dial ...
Returning data to CrimeFragment The code that sets the button’s text is identical to code you call in onCreateView(...). To avoi ...
Chapter 12 Dialogs Make the method private and name it updateDate. Click OK and Android Studio will tell you that it has found ...
Returning data to CrimeFragment More flexibility in presenting a DialogFragment Using onActivityResult(...) to send data back to ...
Chapter 12 Dialogs On a tablet, where you have plenty of room, it is often better to present a DialogFragment to the user to ge ...
Challenge: More Dialogs Challenge: More Dialogs Write another dialog fragment named TimePickerFragment that allows the user to s ...
...
13. The Toolbar A key component of any well-designed Android app is the toolbar. The toolbar includes actions that the user can ...
Chapter 13 The Toolbar AppCompat The toolbar component was added to Android in Android 5.0 (Lollipop). Prior to Lollipop, the a ...
Using the AppCompat library Listing 13.2 Using an AppCompat theme (res/values/styles.xml) @color/colorPrimary @color/colorPr ...
Chapter 13 The Toolbar Menus The top-right area of the toolbar is reserved for the toolbar’s menu. The menu consists of action ...
Defining a menu in XML Figure 13.3 Creating a menu file Here, you use the same naming convention for menu files as you do for l ...
Chapter 13 The Toolbar If you have items in the overflow menu, those items will be represented by the three dots on the far- ri ...
Defining a menu in XML Using Android Asset Studio In the android:icon attribute, the value @android:drawable/ic_menu_add referen ...
Chapter 13 The Toolbar Figure 13.5 Asset Studio Select the Clip Art button to pick your clip art. In the clip art window, choo ...
Defining a menu in XML Back on the main screen, click Next to move to the last step of the wizard. The Asset Studio will show yo ...
Chapter 13 The Toolbar Creating the menu In code, menus are managed by callbacks from the Activity class. When the menu is need ...
«
9
10
11
12
13
14
15
16
17
18
»
Free download pdf