Advertisement
Guest User

Untitled

a guest
May 18th, 2010
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var mainWin = Ti.UI.createWindow({//url:"main.js",
  2.                                   title:'Decks',
  3.                                   barColor: "#000",
  4.                                   tabBarHidden: true});
  5.  
  6. var decksTab = Ti.UI.createTab({title: "Decks", window: mainWin});
  7. var tabGroup = Titanium.UI.createTabGroup();
  8. tabGroup.addTab(decksTab);
  9. mainWin.tab = decksTab;
  10. tabGroup.open();
  11.  
  12. mainWin.orientationModes = [
  13.     Titanium.UI.PORTRAIT,
  14.     Titanium.UI.LANDSCAPE_LEFT,
  15.     Titanium.UI.LANDSCAPE_RIGHT
  16. ];
  17.  
  18. var b = Ti.UI.createButton({title:"foo",
  19.                             left:10,
  20.                             right:10,
  21.                             top:10,
  22.                             bottom:10});
  23. mainWin.add(b);
  24.  
  25. var b2 = Ti.UI.createButton({title:"bar",
  26.                             left:10,
  27.                             right:10,
  28.                             top:10,
  29.                              visible:false,
  30.                             bottom:10});
  31. mainWin.add(b2);
  32. b.addEventListener("click", function () {
  33.                        Titanium.UI.iPhone.hideStatusBar();
  34.                        b2.show();
  35.                        b.hide();
  36.                    });
  37.  
  38. b2.addEventListener("click", function () {
  39.                        Titanium.UI.iPhone.showStatusBar();
  40.                        b.show();
  41.                        b2.hide();
  42.                    });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement