Need Help with DashboardView
If I wanted a dashBoard with 2x3 and not 3x3(default) how do I create it???
I want a dashBoard with the height 250px and with about 9 Items in it.
So my dashBoard would have 6(2x3) on the first screen and 3 on the second screen
I tried setting the height of the dashBoard but had no luck. The height changes but the Items does not get moved to the second screen.
var data = [];
var labels = ['account','cases','calls','contacts','emps','leads','meetings','opps','tasks'];
for (var c=0;c<labels.length;c++)
{
var item = Titanium.UI.createDashboardItem({
image:'../images/dashboard/'+labels[c]+'_off.png',
selectedImage:'../images/dashboard/'+labels[c]+'_on.png',
label:labels[c]
});
if (c==0) item.badge = 10;
data.push(item);
}
var dashboard = Titanium.UI.createDashboardView({
data:data,
height:250
});
win.add(dashboard);
Has anyone done this in the past Please help..
And Thanks for the Help
4 Answers
-
Anyone??
-
Well…you have 9 icons…so take 3 away and you'll get 2 rows of 3…
-
I had tried for quite a while to make a 2x2 grid. I was finally able to get the layout correct… but because I was passing in the images to the itemview.. I wasn't able to use the "selectedImage" attribute..
I just ended up going another direction with my layout..
-
The dashboard view is kind of a pre-canned widget - it doesn't offer a whole lot in terms of customization at this point in time. You might be better off rolling your own solution with Views and Images - it will ultimately be more flexible for you.