This file contains 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 = Titanium.UI.currentWindow; | |
var messageView = Titanium.UI.createView({ | |
height:30, | |
width:250, | |
visible:false | |
}); | |
var indView = Titanium.UI.createView({ | |
height:30, |
This file contains 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 isSearchPresent = false; | |
var data = [ | |
{title:'A - Server 1', header:'Servers'}, | |
{title:'B - Server 2'}, | |
{title:'C - Server 3'}, | |
{title:'A - WorkStation 1', header:'WorkStations'}, | |
{title:'B - WorkStation 2'}, | |
{title:'C - WorkStation 3'}, | |
{title:'D - WorkStation 4'}, |
This file contains 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
// Thanks to Jon Alter for the idea | |
var win = Ti.UI.currentWindow; | |
var data = []; | |
for (var i = 0; i < 10; i++) { | |
data.push({title:'I am row text '+i, leftImage:'../images/user.png', header: 'Yes'}); | |
} | |
for (var i = 0; i < 10; i++) { |
This file contains 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
// Make sure you have your custom font-file under Resources/fonts | |
var webview = Ti.UI.createWebView({ | |
url: 'local_webview.html' | |
}); | |
var window = Ti.UI.createWindow(); | |
window.add(webview); |
This file contains 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 dir = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory); | |
Ti.API.info(dir.nativePath); | |
var testfile = Ti.Filesystem.getFile(dir.nativePath, 'text.txt'); | |
testfile.write('Hello'); | |
Ti.API.info('external directoryListing = ' + dir.getParent().getDirectoryListing()); | |
Ti.API.info('text.txt exists? ' + testfile.exists()); | |
Ti.API.info('text.txt size: ' + testfile.size + ' bytes'); |