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.
4 videos • 0 quizzes • 4 code challenges
-
Play
Preview
Creating the Project and ListActivity
7 minutes 39 seconds
-
Code Challenge
Preview
Code Challenge: Creating the Project and ListActivity
2 objectives
-
Play
Preview
Handling a Lack of Data
3 minutes 57 seconds
-
Code Challenge
Preview
Code Challenge: Handling a Lack of Data
4 objectives
-
Play
Preview
Adding Data for the List
7 minutes 3 seconds
-
Code Challenge
Preview
Code Challenge: Adding Data for the List
3 objectives
-
Play
Preview
All About @string Resources
10 minutes 55 seconds
-
Code Challenge
Preview
Code Challenge: All About @string Resources
5 objectives
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.