Titanium ImageView wont display images?

前端 未结 2 1046
甜味超标
甜味超标 2021-01-26 05:09

I created an image directory in my projects in the UI folder to place my images. So the full path is currently Resources/UI/Images. When i create an image view it wont display t

相关标签:
2条回答
  • 2021-01-26 05:19

    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
    0 讨论(0)
  • 2021-01-26 05:37

    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);
    
    0 讨论(0)
提交回复
热议问题