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 holdTime = 1000, holdStartCoords = { x: 0, y: 0 }, holdStartRow, timeout = false, didLongTouch = false; | |
$(table) | |
.click(function(evt) { | |
if (didLongTouch) { | |
didLongTouch = false; | |
return; | |
} | |
clearTimeout(timeout); | |
if (evt.row == null) { | |
return; |
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: '#fff' }); | |
var web = Ti.UI.createWebView({ | |
url: 'http://www.appcelerator.com/' | |
}); | |
var linkJS = 'document.titaniumLinkQueue = [];' | |
+ '(function(){' | |
+ 'var links = document.getElementsByTagName("a");' | |
+ 'for(var i = 0, l = links.length; i < l; 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
/** | |
* Create a "container" window. This will house all of our high level UI elements | |
*/ | |
var container = Ti.UI.createWindow({ | |
backgroundColor: 'yellow' | |
}); | |
/** | |
* Add some stuff to the top of the container. This will be visible everywhere in the app | |
*/ |
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
<html> | |
<head> | |
<style type="text/css"> | |
body { | |
font: 14px Verdana, Geneva, sans-serif; | |
height: 500px; | |
width: 700px; | |
margin: 10px 20px; | |
} |
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 tabGroupOuter = Ti.UI.createTabGroup(); | |
tabGroupOuter.addTab(Ti.UI.createTab({ | |
title: 'app.js', | |
window: Ti.UI.createWindow({ | |
title: 'app.js', | |
url: 'middle.js', | |
backgroundColor: 'red' | |
}) | |
})); | |
tabGroupOuter.open(); |
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: '#fff' }); | |
win.add(Ti.UI.createLabel({ text: 'Look for the notification! It should be there now.' })); | |
win.open(); | |
Titanium.Android.NotificationManager.notify( | |
0, // <-- this is an ID that we can use to clear the notification later | |
Ti.Android.createNotification({ | |
contentTitle: 'Cheese, Gromit!', | |
contentText: 'Swiss', | |
tickerText: 'Our app made a notification!', |
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
## | |
# This script helps you run Titanium Mobile apps from the command line. | |
# | |
# You will want to customize the variables on lines 25-37, per your own environment. | |
# Most important is to customize "appRootDirectory". | |
# | |
# It can be used a couple of different ways: | |
# 1) To start the Android emulator: | |
# ./t a | |
# 2) To start a simulator, emulator, or deploy to device, use the following: |
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.include('overrideTabs.js'); | |
/* | |
This is a typical new project -- a tab group with three tabs. | |
*/ | |
var tabGroup = Ti.UI.createTabGroup(); | |
/* | |
Tab 1. |
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: '#fff' }); | |
var html = '<html><body>' | |
+ '<a href="http://pedro.com">Pedro</a> ' | |
+ '<a href="http://is.com">is</a> ' | |
+ '<a href="http://a.com">a</a> ' | |
+ '<a href="http://balla.com">balla!</a>.' | |
+ '</body></html>'; | |
var web = Ti.UI.createWebView({ |