Rebuilding from Scratch

Rebuilding from Scratch

Using templates is great for getting started quickly, but to truly understand how to build something we should do it from scratch. In this stage we'll start with a blank project and use the Android system components for displaying data in a list. We'll see first-hand how to build the components of the Model-View-Controller pattern we talked about in the last stage.

Extra Credit

Liven up your ListView

The ListView can be customized in many ways. Take a look at the methods or XML attributes you can use to change how your ListView looks, and make it snazzy!

Clicks Ahoy!

See if you can add interactivity to your ListView using an OnItemClickListener. Display a message in a Toast, write something to the log, or even try navigating to a new activity.

Strings Everywhere!

Now that you know how to use String resources in strings.xml, go back to your Crystal Ball app and change all the Strings in the project to String resources. Even the array of answers, CrystalBall.mAnswers, can be stored as a <string-array> resource.