Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- APP.JS
- setTimeout(function(){
- 'use strict';
- var StartUp;
- StartUp = require('control/startup');
- StartUp.StartApp();
- }, 2000);
- STARTUP.JS
- function StartApp(){
- 'use strict';
- var MainWin;
- var greenSquare;
- var redSquare;
- MainWin = Titanium.UI.createWindow({
- backgroundColor: '#ccc',
- width:'100%',
- height:'100%',
- top:0
- });
- greenSquare = Titanium.UI.createView({
- borderRadius:10,
- backgroundColor:'green',
- width:50,
- height:50,
- left:50,
- top:50
- });
- redSquare = Titanium.UI.createView({
- borderRadius:10,
- backgroundColor:'red',
- width:50,
- height:50,
- left:greenSquare.left+50,
- top:200
- });
- MainWin.add(greenSquare);
- MainWin.add(redSquare);
- MainWin.open();
- }
- exports.StartApp = StartApp;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement