We have the following structure:
HomeWindow.prototype.addHeader = function() { this.header_banner = Ti.UI.createLabel({ top : the_screen.getBannerTop(), left : the_screen.getBannerLeft(), width : the_screen.getBannerWidth(), height : the_screen.getBannerHeight(), backgroundImage : dir_path.R + "images/ipad/home/ipad-home-main-banner-towns-list.png", zIndex : 14 }); this.header_banner_shadow = Ti.UI.createLabel({ backgroundImage : dir_path.R + "images/ipad/ui/ipad-nav-side-shadow.png", left : the_screen.getHorizontalShadowLeft(), width : the_screen.getHorizontalShadowWidth(), top : the_screen.getHorizontalShadowTop(), height : the_screen.getHorizontalShadowHeight(), zIndex : 14 }); this.left_banner = Ti.UI.createLabel({ top : the_screen.getLeftBannerTop(), left : the_screen.getLeftBannerLeft(), width : the_screen.getLeftBannerWidth(), height : the_screen.getLeftBannerHeight(), backgroundImage : dir_path.R + "images/ipad/home/ipad-nav-blue-background.png", // backgroundColor: 'red', zIndex : 11 }); this.left_banner_shadow = Ti.UI.createLabel({ backgroundImage : dir_path.R + "images/ipad/ui/ipad-nav-side-shadow.png", left : the_screen.getVerticalShadowLeft(), width : the_screen.getVerticalShadowWidth(), top : the_screen.getVerticalShadowTop(), height : the_screen.getVerticalShadowHeight(), zIndex : 11 }); this.right_banner = Ti.UI.createLabel({ top : the_screen.getRightBannerTop(), left : the_screen.getRightBannerLeft(), width : the_screen.getRightBannerWidth(), height : the_screen.getRightBannerHeight(), backgroundImage : dir_path.R + "images/ipad/home/ipad-home-map.jpg", zIndex : 3 }); };Now we add buttons to the left pane:
HomeWindow.prototype.addButton = function(txt, left_pos, top_pos, img_width, img_height, img) { var btn = Ti.UI.createButton({ // title : txt, top : top_pos, left : left_pos, height : img_height, width : img_width, backgroundImage : img, zIndex : 11 }); this.buttons[this.button_count] = btn; this.button_count += 1; // this.win.add(btn); return btn; };Now When an event fires we do this:
Ti.App.addEventListener('loadHomeContent', function(e) { // alert("called"); clearPanes(function() { // alert("called"); if ( typeof (e.load_slide) == "undefined") { if (town_detail_state) { central.removeSlide(); central.openSlide(home_obj, central.getSystemObject("town"), 'town'); central.leftSlide(); town_detail_state = null; } else { // alert("AA"); // central.raiseSlideWindow(); central.leftSlide(); } } else { central.removeScreen(home_obj); central.removeSlide(); } central.clearScreen(); central.addContentView(home_obj.getWindow(), e.content, e.theme); central.lowestWindow(); central.displayScreen(home_obj); if (e.theme != "") central.addTrailMap(e.theme,home_obj); else central.removeTrailMap(home_obj); }); });So the addTrailMap uses Zindex : 11 But is always over the top of the header, which has a higher zIndex?
Can anyone help me out with this?