Skip to content

Instantly share code, notes, and snippets.

@srahim
Created August 8, 2011 22:36
Show Gist options
  • Save srahim/1132924 to your computer and use it in GitHub Desktop.
Save srahim/1132924 to your computer and use it in GitHub Desktop.
Test file
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var data = [];
var item = Titanium.UI.createDashboardItem({
image:'Apple.png',
selectedImage:'Apple.png',
label:'test'
});
data.push(item);
data.push(item);
data.push(item);
data.push(item);
data.push(item);
data.push(item);
data.push(item);
data.push(item);
data.push(item);
data.push(item);
data.push(item);
data.push(item);
var dashboard = Titanium.UI.createDashboardView({
data:data
});
win1.add(dashboard);
win1.open();
@WhichKatieDid
Copy link

Suggestion: Use a for loop so that all the items in data are unique instead of the same one over and over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment