O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

1. Add the choice of a background color to the settings activity. Create a couple of new color resources in color.xml. Add these choices as a RadioGroup to the settings screen. You will have to modify the layout to place all the RadioGroups in a ScrollView so that you can see them all. Make the choice persist in a SharedPreferences object. Use the following command in the onCreate method of the settings activity to set the chosen background color:

scrollviewobject.setBackgroundResource(R.color.colorresourcename);

2. Create a method in ContactDataSource that will only update the Contact’s Address. Create a ContactAddress object to pass data to the method.

3. Modify the Contact table to include a field BFF ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required