Skip to content

Instantly share code, notes, and snippets.

@donayama
donayama / gist:1376645
Created November 18, 2011 14:48
cameraでtabを押すと...
Ti.Media.showCamera({
success : function(event) {
alert('Your photo was saved to the Photo Gallery');
},
cancel : function() {
},
error : function(error) {
var message;
if (error.code == Ti.Media.NO_CAMERA) {
message = 'Device does not have video recording capabilities';
@donayama
donayama / app.js
Created June 5, 2011 13:09
FlickrShow
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
Titanium.UI.iPhone.statusBarStyle = Titanium.UI.iPhone.StatusBar.OPAQUE_BLACK;
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
@donayama
donayama / app.js
Created February 27, 2011 11:06 — forked from donayama/app.js
// Test Runner - Online Code Debuging Framework for Titanium Mobile(iOS)
var tabGroup = Titanium.UI.createTabGroup();
tabGroup.addTab(Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Test Runner',
window: Titanium.UI.createWindow({
title:'Test Runner',
backgroundColor:'#fff',
url: 'testrunner.js'
})
@donayama
donayama / app.js
Created February 27, 2011 08:12
Online Code Testing for Titanium Mobile (not secure)
// Test Runner - Online Code Debuging Framework for Titanium Mobile(iOS)
var tabGroup = Titanium.UI.createTabGroup();
tabGroup.addTab(Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Test Runner',
window: Titanium.UI.createWindow({
title:'Test Runner',
backgroundColor:'#fff',
url: 'testrunner.js'
})
@donayama
donayama / app.js
Created October 31, 2010 05:58
Titanium Mobile iPadSample
// -------------------------
// TabGroup&Tabの定義と表示
// -------------------------
//
// ※余談ですが、SplitViewをコンテナとしてTabGroupを持つ事が出来ません。
// そういう構成を組みたい場合はwin3.jsサンプルのようにViewを分割し、
// 左側のViewにTabGroupをセットするようなやり方になります。
//
var tabGroup = Ti.UI.createTabGroup();
tabGroup.addTab(Ti.UI.createTab({