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 splash = Ti.UI.currentWindow; | |
// do whatever you want.. animations.. put a label "loading..." and animate it (remember to play with delays and durations to make this screen last longer) | |
// and when you finish loading, just change the active tab. | |
splash.tabGroup.setActiveTab(splash.mainTab); |
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
Titanium.App.ISIPAD = Ti.Platform.osname == 'ipad'; | |
Ti.include('/programs/main.js'); | |
var ff = {}; | |
ff.app = {}; | |
ff.ui = {}; | |
// create tab group | |
ff.app.tabGroup = Titanium.UI.createTabGroup({ | |
backgroundColor: '#000' |
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 referenceLibrary = require('bencoding.dictionary').createReferenceLibrary(); | |
Ti.API.info("This feature is only supported in iOS5 and above"); | |
Ti.API.info("Check if we have the min OS version needed"); | |
Ti.API.info("Is Supported? => " + referenceLibrary.isSupported()); | |
Ti.API.info("Check if Apple knows the definition for fanboy"); | |
var hasDefinition = referenceLibrary.wordHasDefinition('fanboy'); | |
Ti.API.info("Term has definition =>" + hasDefinition); | |
if(!hasDefinition){ | |
alert('You can still call showDialog it will just display a message that no definition was found'); |
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
//Create SMSDialog object | |
var sms = require('bencoding.sms').createSMSDialog({ barColor:'#336699' }); | |
Ti.API.info("Is This Feature Supported? => " + sms.canSendText); | |
//This is an example of how to check if the device can send Text Messages | |
if(!sms.canSendText){ | |
var noSupport = Ti.UI.createAlertDialog({ | |
title:'Not Supported', | |
message:"This device doesn't support sending text messages" | |
}).show(); |
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.createWindow({ | |
title:'Learning Titanium - Activity Inticator', | |
backgroundColor:'#ccc' | |
}); | |
var actInd = Ti.UI.createActivityIndicator({ | |
width:50, | |
height:50, | |
message: 'Hello there!', | |
color: 'FF0000' |