This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow({backgroundColor: 'white'}); | |
| var recentUpdatesTableView = Ti.UI.createTableView({ | |
| data : [{title: 'Row 1'}, {title: 'Row 2'}, {title: 'Row 3'}], | |
| borderWidth : 1, | |
| height : 130, | |
| width : 280, | |
| backgroundColor: 'transparent' | |
| }); | |
| var view = Ti.UI.createView({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var privatedocuments = Ti.Filesystem.applicationDataDirectory + '../Library/Private%20Documents/'; | |
| // or Android: var privatedocuments = Titanium.Filesystem.externalStorageDirectory; | |
| var contentsource = Ti.Filesystem.resourcesDirectory + 'library/'; | |
| var dirTest = Titanium.Filesystem.getFile(contentsource); | |
| var dirList = dirTest.getDirectoryListing(); | |
| for(var i = 0; i < dirList.length; i++) { | |
| var originfile = Titanium.Filesystem.getFile(contentsource, dirList[(i)]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow({backgroundColor: 'white'}); | |
| var saveButton = Titanium.UI.createButton({ | |
| title : '', | |
| backgroundImage : 'images/home.png', | |
| backgroundFocusedImage : true, | |
| borderRadius : 5, | |
| borderWidth : 0.5, | |
| borderColor : '#000', | |
| width : 45, | |
| height : 30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow({backgroundColor: 'white'}); | |
| // ScrollView 1 | |
| var sv1 = Ti.UI.createScrollView({ | |
| top: 0, | |
| left: 100, | |
| width: 200, | |
| height: 200, | |
| contentWidth:'auto', | |
| contentHeight:'auto', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ti.UI.backgroundColor = 'white'; | |
| var win = Ti.UI.createWindow({ | |
| exitOnClose : true, | |
| layout : 'vertical' | |
| }); | |
| var picker = Ti.UI.createPicker({ | |
| top : 50 | |
| }); | |
| picker.selectionIndicator = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow(); | |
| var imageView = Titanium.UI.createImageView({ | |
| image : 'http://www.appcelerator.com/wp-content/uploads/2009/06/titanium_desk.png', | |
| width : 261, | |
| height : 178, | |
| top : 20 | |
| }), | |
| olt = Titanium.UI.create3DMatrix(), curX, curY; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fetchData(start, len) { | |
| var rows = []; | |
| for (var i = 0; i < len; i++) { | |
| var tmp = i + start; | |
| rows.push({title: 'Row ' + tmp}); | |
| } | |
| return rows; | |
| } | |
| var win = Ti.UI.createWindow({backgroundColor : 'white'}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create the tab group | |
| var tabGroup = Titanium.UI.createTabGroup(); | |
| // Assign windows & tabs | |
| // IMPORTANT: | |
| // 'tabBarHidden: true' should be set on all windows | |
| // height should be set to 480 - customTabBar's height (change 480 to app screen height) | |
| var win1 = Titanium.UI.createWindow({ title:'Tab 1', height: 440, tabBarHidden: true }); | |
| var btn1 = Ti.UI.createButton({title: 'Hide Tabs', height: 40}); | |
| win1.add(btn1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow({backgroundColor: 'white'}); | |
| var player = null; | |
| var info = Ti.UI.createLabel({ | |
| text:'', | |
| height:'auto', | |
| width:'auto', | |
| top:200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow(); | |
| var circle = []; | |
| var circle2 = []; | |
| var circleX = []; | |
| var circleY = []; | |
| for(var i = 0; i < 10; i++) { | |
| circleX[i] = Math.floor(Math.random() * (Ti.Platform.displayCaps.platformWidth - 50)); |