Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Dashboard view not displaying the button images

I have created a project which uses the dashboardview code from the KitchenSink sample but the button images are not being displayed.

var labels = ['account','cases','calls','contacts','emps','leads','meetings','opps','tasks'];
for (var x=0;x<2;x++)
{
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);
}
}

I copied the folder structure of the KitchenSink to see if that is the problem but still doesn't work.

Any help on this problem would be much appreciated.

— asked November 7th 2010 by Zaldy Acosta
  • button
  • dashboardview
  • image
0 Comments

2 Answers

  • you need to copy the images to the correct path… I had this same problem when testing with the dashboard from the kitchen sink

    — answered November 7th 2010 by Aaron Saunders
    permalink
    1 Comment
    • and where is the correct path?

      — commented December 27th 2010 by Ignacio Opazo
  • Hi Aaron,

    Thanks for the reply.

    I have copied the file structure of the images in the KitchenSink example as well as copied the images.

    e.g. Resources –> images–> dashboard–> png files.

    But this still did not make any difference.

    — answered November 7th 2010 by Zaldy Acosta
    permalink
    1 Comment
    • but if i want charge image of dashboard from server (url)

      — commented October 7th 2011 by mahmoud kamal
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.