Titanium ImageView wont display images?

无人久伴 提交于 2019-12-02 08:12:42

There is an error in your code. There is no url property for ImageView control. You should use image property. Try the following code

var imgv = Titanium.UI.createImageView({
                 image:"../images/sb02.jpg"
           });
self.add(imgv);

To answer my question thanks to Anand for the tips:

  1. Images should be placed in the Resources dir
  2. Afterwards reference them just by /folder/image.jpg in my case /images/sb1.jpg
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!