January 2014
Intermediate to advanced
736 pages
70h 43m
English
You’ll now use the techniques you learned in Section 7.3.4 to create two menu resource files in the app’s res/menu folder:
• fragment_contact_list_menu.xml defines the menu item for adding a contact.
• fragment_details_menu.xml defines the menu items for editing an existing contact and deleting a contact.
When both the ContactListFragment and the DetailsFragment are displayed on a tablet at the same time, all of the menu items are displayed.
Figures 8.12–8.13 show the settings for the menu items in the two menu resource files. Each menu item’s Order in category values determines the order in which the menu items appear on the action bar. For each menu item’s Icon value, we specified a standard Android icon. ...
Read now
Unlock full access