Hi - I have a scrollview which is inside a "container" view. I am then trying to put a logo on top of the scroll view. In my head this should work, but when I run the app, there's simply nothing there.
I am creating the elements in the order
- create a view
- create a scrollview
- add elements to the scrollview
- create image
- add scrollview to view
- add image to view
Each has a zIndex but it's just not showing anything. Any ideas where I'm going wrong?!
var shelf = Ti.UI.createView( { height: 110, layout: 'vertical', top:30, zIndex:8, backgroundImage:'/global/images/shelf.jpg', touchEnabled: true } ); var scrollView = Ti.UI.createScrollView({ scrollType: 'horizontal', horizontalWrap:true, contentHeight:'auto', contentWidth:'auto', showHorizontalScrollIndicator:false, height:110, zIndex:9 }); shelf.add(scrollView); var view = Ti.UI.createView( { width:800, height:90, layout:'horizontal', zIndex:10 } ); scrollView.add(view); //add the row label var newLogo = Ti.UI.createImageView({ image: '/global/images/shelf_label_bg.png', top:50, left: 0, width: 250, height: 60, touchEnabled: false, zIndex:11 }); //loops through and uses a function to just place an image in the scrollview (for demo purposes) for(var i = 0; i <= 6; i++){ var row = createDocumentElement(i); view.add(row); } shelf.add(newLogo); win.add(shelf);Thanks for any help!
My Env:
Titanium Command-Line Interface, CLI version 3.2.0, Titanium SDK version 3.2.0.GA Building for emulator: titanium_1_WVGA800 Targeting Android SDK: 18 Building for the following architectures: armeabi, armeabi-v7a, x86