Guest User

Untitled

a guest
Oct 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. function myNewWindow() {
  2.  
  3.  
  4. var newWin = Titanium.UI.createWindow({
  5. width: Titanium.Platform.displayCaps.platformWidth,
  6. height: Titanium.Platform.displayCaps.platformHeight,
  7. backgroundImage: Titanium.App.Properties.getString('bg'),
  8. _parent: Titanium.UI.currentWindow
  9. });
  10.  
  11.  
  12. var btn1 = Titanium.UI.createButton({
  13. title:'Test', top:100, left:20, width:200, height:30
  14. });
  15.  
  16. //setTimeout(function() {
  17. //Titanium.UI.currentWindow.navGroup.close(aWin);
  18. //},2000);
  19.  
  20. btn1.addEventListener('click', function(e) {
  21. alert('this button works!');
  22. Titanium.UI.currentWindow.navGroup.close(newWin);
  23. });
  24.  
  25. setTimeout(function() {
  26. //Titanium.UI.currentWindow.navGroup.close(aWin);
  27. },2000);
  28.  
  29. aWin.add(btn1);
  30.  
  31. return aWin;
  32.  
  33.  
  34. };
Add Comment
Please, Sign In to add comment