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 Thumbnail of Video File | |
This snippet captures a thumbnail JPG image, based on a frame @ 2 second time-lapse. | |
Titanium Mobile | |
*/ | |
var movie = Titanium.Media.createVideoPlayer({ | |
contentURL:FILENAME, |
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
/** | |
* To be used this way | |
*/ | |
var Log = require('log'); | |
Log.Info('This is an info log'); | |
Log.Error('This is an error log'); | |
Log.Debug('This is a debug log'); |
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(); | |
var images = []; | |
for(var i = 1; i < 100; i++){ | |
// Assuming all the images are called image1.jpg, image2.jpeg, etc... | |
images.push('/images/image'+i+'.jpg'); | |
} | |
var gallery = Gallery(images,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 win = Ti.UI.createWindow({ | |
backgroundColor: '#333' | |
}); | |
var menuWidth = 200; | |
var container = Ti.UI.createScrollView({ | |
disableBounce: false, | |
horizontalBounce: true, | |
contentWidth: Ti.Platform.displayCaps.platformWidth + menuWidth |
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
/* | |
State. | |
*/ | |
var simplify = Ti.Platform.osname === 'mobileweb'; | |
var currentFlashes = {}; | |
/* | |
Public API. | |
*/ | |
exports.chainAnimateForever = chainAnimateForever; |
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 imgTableLoco = Ti.UI.createTableView({ | |
width: 270, | |
height: 290, | |
top: 0, | |
backgroundColor: 'black' | |
}); |
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 code was inspired by the work done by David Riccitelli | |
* | |
* 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 | |
* |
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
//"THE BEER-WARE LICENSE": As long as you retain this notice you can do whatever you want with this stuff. | |
//If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Jamie Buckley | |
var screenWidth = Ti.Platform.displayCaps.platformWidth; | |
var screenHeight = Ti.Platform.displayCaps.platformHeight; | |
var win = Ti.UI.createWindow({ | |
fullscreen: true, | |
width: screenWidth, | |
height: screenHeight, |
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
function PassCode(_params){ | |
_params = _params || {}; | |
// @PARAMS:{ | |
// boxSize: (Number) size of the passcode character boxes | |
// backgroundColor: (String) background color of the mainview | |
// backgroundImage: (String) background image of the mainview | |
// panicColor: (String) background color of the view when panic() is called - when wrong password | |
// titleText: (String) the text of the title view, above the pass code boxes by default, | |
// mainView: (Object) params for the main view that hold the passcode boxes |
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'); | |
//FACEBOOK CREDENTIAL | |
Titanium.Facebook.appid = "134793934930"; | |
Titanium.Facebook.permissions = ['publish_stream', 'read_stream']; | |
// | |
// create root window |