Reputation: 2022
i'm trying to change my background of a window in titanium , unfortuantly its not working. i also tried to use 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',
});
Upvotes: 1
Views: 911
Reputation: 24815
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.
Upvotes: 1