backgroundImage view

You must Login before you can answer or comment on any questions.

Hi, I assign a backgroundImage to a view like this:

var view= Titanium.UI.createView({
    backgroundImage: 'urlImage'
});
On iphone iOS5, backgroundImage displayed but on an other iPhone iOS4 backgroundImage is not displayed. Does Titanium.UI.createView({backgroundImage: 'urlImage'}); is espcific to iOS 5 ?

— asked 10 months ago by zozo zozo
1 Comment
  • Hi ZOZO,

    Can you tell us local url or remote url you are using?.

    — commented 10 months ago by Nitin Chavda

5 Answers

I used more components like imageView, textField (assigning backgroundImage). And, I have always same result

Hi Zozo ,

As per my knowledge remote url is only supported for ImageView not any other view.

— answered 10 months ago by Nitin Chavda
answer permalink
1 Comment
  • with imageView, background doesn't displayed correctly using heigth and width

    — commented 10 months ago by zozo zozo

Hello Zozo,

Try this instead of view

var imgs = 'urI Image'
var imgView = Ti.UI.createImageView({
    height : 'auto',
    width : 'auto',
    left : '2%',
    right : '2%',
    image : imgs.toString()
});
 
win.add(imgView);

Titanium.UI.createView({backgroundImage: 'urlImage'}); works but doesn't works for all devices (on iOS5 or iOS4)

Your Answer

Think you can help? Login to answer this question!