hi all!
i got my app divided in 4 files, app.js, opostos1.js, opostos2.js, opostos3.js.
The app.js file are the menu with buttons to opostos1.js, opostos2.js, opostos3.js.
My question is how can I get back from opostos1.js, opostos2.js, opostos3.js to app.js window ?
I tried to windowOpostos1.close() and it works but I had to click in the back button several times...it's the right way and i'm doing something wrong or there are another way to do this ?
1 Answer
app.js
var winHome = Titanium.UI.createWindow({ title:"Home Screen", //backgroundColor:"#FFF6A5", fullscreen:true, backgroundColor:"#EEF1BD", }); winHome.orientationModes = [Ti.UI.LANDSCAPE_RIGHT]; var viewMenu2 = Titanium.UI.createView({ width:"100%", height:"100%", }); var SOpostos = Titanium.UI.createImageView({ image:"images/Menu/SOpostos.png", width:301, height:271.5, top:338, left:530, opacity:0, }); SOpostos.addEventListener('click', clickOpostos); function clickOpostos(){ win1 = Titanium.UI.createWindow({ url:"opostos1.js", title:"Opostos", backgroundColor:"#EEF1BD", }); win1.open(); } viewMenu2.add(SOpostos); winHome.add(viewMenu2); winHome.open();
opostos1.js
Your Answer
Think you can help? Login to answer this question!