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 activity = Titanium.App.iOS.createUserActivity({ | |
activityType : "com.appcelerator.handoff.example.browsing-location" | |
userInfo : someDictionary, | |
needsSave : false, | |
webpageUrl : "optional webpage", | |
title : "an example" | |
}); | |
activity.addEventListener("useractivitywascontinued",function(e){ | |
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
'use strict'; | |
import View from 'view'; | |
import Window from 'window'; | |
// Example Usage | |
let win = new Window(); | |
let view = new View({ | |
top: 0, |
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 qxCore = { | |
callbackWrappers : { | |
wrapperCounter : 0, | |
generateId : function(name){ | |
qxCore.callbackWrappers.wrapperCounter++; | |
return name + qxCore.callbackWrappers.wrapperCounter; | |
} | |
} | |
}; |
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 tab group | |
demo.tabMainGroup = Ti.UI.createTabGroup({isOpen:false}); | |
demo.tabLoginGroup = Ti.UI.createTabGroup({isOpen:false}); | |
demo.wLogin = Ti.UI.createWindow({ | |
id:'wLogin' | |
}); | |
demo.tbLogin = Ti.UI.createTab({window:demo.wLogin}); |
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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
var tzt ={ | |
testIt: function(){ | |
alert('testIt'); | |
}, | |
isAndroid : function(){ | |
return (Ti.Platform.osname == 'android'); | |
}, |
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
bGet.addEventListener('click', function(){ | |
var _url = "https://my.url.goes.here"; | |
var username='demo'; | |
var password='badpass'; | |
var aToken = 'Basic ' + Ti.Utils.base64encode(username + ':' + password); | |
var c = Titanium.Network.createHTTPClient(); | |
c.setTimeout(10000); | |
c.onload = function(e) | |
{ | |
Ti.API.info("ONLOAD = "+e); |
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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Ti.UI.setBackgroundColor('#000'); | |
Ti.UI.iPhone.statusBarStyle = Ti.UI.iPhone.StatusBar.OPAQUE_BLACK; | |
//Create main app namespace | |
var demo={}; | |
//Create a few helpers | |
demo.myHelpers = { | |
isAndroid : function(){ | |
return (Ti.Platform.name == 'android'); | |
}, |
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 xhr = Titanium.Network.createHTTPClient(); | |
xhr.onload = function() | |
{ | |
var results = this.responseText; | |
Ti.API.info('Results from xhr Lookup = ' + results ); | |
var supportDir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'my_support'); | |
if(!supportDir.exists()){ | |
supportDir.createDirectory(); | |
} |
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
/** | |
* | |
* | |
* Copyright 2011 Aaron K. Saunders, Clearly Innovative Inc | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a> |
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
tmp | |
android/ | |
iphone/ |