Skip to content

Instantly share code, notes, and snippets.

@mkrogh
Created January 18, 2012 18:20
Show Gist options
  • Save mkrogh/1634643 to your computer and use it in GitHub Desktop.
Save mkrogh/1634643 to your computer and use it in GitHub Desktop.
Titanium ImageView path problem
// located in: /js/include.js
// this works just fine:
// The leftImage is shown
var table = Ti.UI.createTableView({
data: [{leftImage: '/icons/test.png', "title": "test"}]
});
//This does not work:
// neither does image: '../icons/test.png'"
var table = Ti.UI.createTableView();
var row = Ti.UI.createTableViewRow({
title: row_data.title
});
var img = Ti.UI.createImageView({
image: '/icons/test.png',
width: 32,
height: 32
});
row.setLeftImage(img);
row.className = "sized_image_row";
table.setData([row]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment