开发者

how can i use use local images in my titanium project

i'm trying to change my background of a window in titanium , unfortuantly its not working. i also tried to use 开发者_JS百科many local images and they did't load. any help is highly appreciated ,How can use my resources ?

var win1 = Titanium.UI.createWindow({  
title:'Hello',
backgroundImage:'back.png',
});


You can do that, just like that. backgroundImage is supported on window.

Just make sure you use the right path:

backgroundImage: Ti.FileSystem.resourcesDirectory + 'back.png'

Here I am assuming back.png (case sensitive) is actually in the resources directory root.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜