Skip to content

Instantly share code, notes, and snippets.

@codeboxed
codeboxed / database.js
Created June 6, 2011 09:07
Titanium Mobile Database Class
/**
* Class name: database.js
* Author: Codeboxed
* URL: http://www.codeboxed.com
* Date: June 6, 2011
* Platform: Titanium
*/
var Database = function(dbPath, dbName, table, tableFields){
@codeboxed
codeboxed / app.js
Created July 1, 2011 17:55
Implement More tab on Android
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var isAndroid = false;
if (Ti.Platform.name === 'android') {
isAndroid = true;
}
// create tab group
@codeboxed
codeboxed / info_titanium_tabs
Created October 13, 2011 14:32
info titanium tabs
Asta ai in app.js:
Trebuie sa deschizi un window temporar din care apoi sa apelezi homewindow.
var tabGroup = Titanium.UI.createTabGroup();
var homeWindow;
rootWindow = Titanium.UI.createWindow(
@codeboxed
codeboxed / toolbar
Created October 13, 2011 14:53
toolbar
var spacer = Math.round(Ti.Platform.displayCaps.platformWidth*0.25);
var width = spacer-4;
var height = 36;
// TAB BAR
var tabBar = Ti.UI.createView({
width:Ti.Platform.displayCaps.platformWidth,
height:40,
@codeboxed
codeboxed / android_menu
Created October 14, 2011 14:15
android menu
if (isAndroid) {
var myLocation = null;
var centerEdinburgh = null;
var sat = null;
var std = null;
var menuClickHandlers = function() {
myLocation.addEventListener('click', function() {