Search code examples
imageviewz-indextitaniumappcelerator-mobile

Titanium: ImageView on top of opened Window


Somehow I can't manage to get an imageview to be on top of a window. This is my code:

var win = Titanium.UI.createWindow();

var startupView = Titanium.UI.createImageView({
image: 'iphone/Default.png',
opacity:1,
zIndex:20
});

var w = Titanium.UI.createWindow({
title:'Menu',
url:'menu.js',
zIndex: 1,
backgroundImage:'ui/bg.gif'        
});

w.open();

win.add(startupView);
win.open();

Basically, I am loading something in the background, and upon finish I am fading out the "startupView". When faded out, I want to have the "w" window to be open underneath it.. What am I missing here?


Solution

  • dont add the startupView...

    just open the window... then open the startup view... then fade the startupView out when the window is finished loading