-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Appcelerator Titanium Smartphone App Development Cookbook Second Edition
By :
So far, we've created a TableView that, though totally usable and showing the names of our recipes from the XML feed, is a bit bland. To customize our table, we'll need to create and add custom TableRow objects to an array of rows, which we can then assign to our TableView object. Each of these TableRow objects is essentially a type of view, to which we can add any number of components, such as Label, ImageView, and Button.
Next up, we'll create our TableRow objects and add to each one the name of the recipe from our XML feed, the publication date, and a thumbnail image, which we'll get from the images folder in our Resources directory. If you do not have an images directory already, create one now and copy the images from the source code for this chapter.
Open your recipe.js file and replace the refresh function with the following code:
function refresh() {
var data = []; //empty data array
//declare the http client...
Change the font size
Change margin width
Change background colour