Exercises

1. Create a new color resource to be used as the background for the data entry part of the ContactActivity. Search on the Web for the color and associated Android color code (color codes always start with a # symbol) and add it to the color.xml file. Set the background of the data entry part of the layout to that color resource.

2. Make the navigation work for all activities in the app. Copy the navigation bar XML code to the layout associated with each activity. Copy the Java code that makes the buttons work to the Java file associated with each activity. You will have to modify that code to reference the activity it is in rather than ContactActivity. Add code to disable the ImageButton associated with the activity that is displayed. ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.