javascript - How to open another view on button click without creating a Window in Titanium? -
i have views: view1.xml, view2.xml. both files existing. have button in view1.xml , when user clicks on button, want load view2.xml file in same window. not want create window load view. think need add together event listener button , load view not know how that.
i did this
$.next.addeventlistener('click', function() { var myview = alloy.createcontroller('nextview').getview(); $.main_window.add(myview); });
do this
var view=alloy.createcontroller('mycoolwindow').getview(); win.add(view); you have add together view in window instead of opening window
javascript xml titanium titanium-mobile titanium-alloy
No comments:
Post a Comment