Question

How do I set my background image for my view as for example http://bluebackground.com/__oneclick_uploads/2008/04/blue_background_03.jpg ?

I knew how to do it from local folder something like backgroundImage:'images/bg.png', but how do I fetch using http and set it as my background?

Was it helpful?

Solution

You can set image like :

view.backgroundImage="http://bluebackground.com/__oneclick_uploads/2008/04/blue_background_03.jpg";

This will take some time in downloading image and set it.

Hope this helps you.

OTHER TIPS

Pls Try this set image on top corner...

var bgImage = Ti.UI.createImageView({ height : 'auto', width : 'auto', top : 0, left : 0, image : 'images/h-5.jpg' }); win.add(bgImage);

If the image is on the web you may want to simply try creating a full sized image view with the URL and a low zIndex and adding it to your window.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top