图像不会出现在Titanium应用程序中

时间:2013-10-09 21:29:24

标签: titanium android-image

我在ui / handheld / android /目录中有一个文件。在其中,我正在调用如下代码中的图像

var var1 = Ti.UI.createImageView({
    bottom: '150dp',
    image: '/images/example.png',
    width: '205.33dp'
})

但它没有出现。我在Resources / android / images /

上有我的图像

2 个答案:

答案 0 :(得分:0)

那应该是

var var1 = Ti.UI.createImageView({
    bottom: '150dp',
    image: '/android/images/example.png',
    width: '205.33dp'
})

由于

答案 1 :(得分:0)

我解决了这个问题:

var var1 = Ti.UI.createImageView({
  bottom: '150dp',
  image: '/images/example.png', /* this is the RIGHT way */
  width: '205.33dp'
})

我尝试了几种方法并找到了合适的方法。谢谢大家!

相关问题