Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Just try this code . I have set height of views and removed webservices to check your click even. Its working fine. </p> <pre><code>//Titanium.include('commonFile.js'); var win = Ti.UI.currentWindow; win.backgroundColor='black'; // var url = carsDetailUrl + nid; var imageArea = Titanium.UI.createView({ width : 300, top: 50, backgroundColor:'white', height : Ti.UI.SIZE, borderRadius : 6 }); var image1 = Ti.UI.createImageView({ image : 'KS_nav_ui.png', left : '8dp', top : '10dp', width : 135, height : 106, backgroundColor:'blue', touchEnabled : 'true', borderColor : '#000000', borderRadius : 6, borderWidth : 1, }); var completeScrollView = Ti.UI.createScrollView({ top : '0dp', left : '0dp', contentWidth : 320, touchEnabled : 'true', borderRadius : 10, // backgroundImage : '../images/bg.png', showHorizontalScrollIndicator : false, showVerticalScrollIndicator : false, height : Ti.UI.SIZE }); var mainScrollView = Ti.UI.createScrollView({ top : '0dp', left : '0dp', contentWidth : 320, touchEnabled : 'true', borderRadius : 10, backgroundColor:'yellow', // backgroundImage : '../images/bg.png', showHorizontalScrollIndicator : false, showVerticalScrollIndicator : false, }); var viewDetail = Ti.UI.createView({ top : '10dp', left : '10dp', height : 'auto', width : '94%', touchEnabled : 'true', borderRadius : 10, backgroundColor : '#FFFFFF', }); /*var image1 = Ti.UI.createImageView({ image : encodeURI(images[1]), left : '8dp', top : '10dp', width : 135, height : 106, touchEnabled : 'true', borderColor : '#000000', borderRadius : 6, borderWidth : 1, });*/ var image2 = Ti.UI.createImageView({ image :'KS_nav_views.png', left : '150dp', top : '11dp', width : '70dp', height : '50dp', backgroundColor:'green', borderColor : '#000000', borderRadius : 3, borderWidth : 1, }); viewDetail.add(imageArea); imageArea.add(image1); imageArea.add(image2); mainScrollView.add(viewDetail); // mainScrollView.add(view2nd); completeScrollView.add(mainScrollView); win.add(completeScrollView); image1.addEventListener('click', function(evt) { Ti.API.info("image clicked"); var newWin = Ti.UI.createWindow({ url : 'newWindow.js', title : 'New Window', tabBarHidden : true, barColor : '#000000', navBarHidden : true, // backgroundImage : "../images/bg.png" }); Titanium.UI.currentTab.open(newWin, { animated : true }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload