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 file was auto-generated by the Titanium Module SDK helper for Android | |
* Appcelerator Titanium Mobile | |
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved. | |
* Licensed under the terms of the Apache Public License | |
* Please see the LICENSE included with this distribution for details. | |
* | |
* var mod = require('org.selfkleptomaniac.ti.mod.stupidimagereader'); | |
* var image = "washingmachine.jpg"; | |
* |
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 sample lets you record and share video with Appcelerator Titanium on Android. | |
* REQUIRES THE 1.6.0 RC OF TITANIUM MOBILE SDK | |
* http://developer.appcelerator.com/blog/2011/02/release-candidate-for-titanium-mobile-1-6-0.html | |
*/ | |
/** | |
* First, create our UI. We'll have two buttons: record, and share. | |
*/ | |
var win = Titanium.UI.createWindow({ |
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 ApplicationWindow(title) { | |
var self = Ti.UI.createWindow({ | |
title:title, | |
backgroundColor:'white' | |
}); | |
var compass = Ti.UI.createImageView({ | |
image:'/images/arrow.gif', | |
width:Ti.UI.SIZE, | |
height:Ti.UI.SIZE, |
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
button.addEventListener('click', function(e){ | |
Ti.Media.openPhotoGallery({ | |
error: function(){}, | |
cancel: function(){}, | |
success: function(e){ | |
var size = Math.min(e.media.width, e.media.height) / 2; | |
var image = e.media.imageAsCropped({ | |
x: 0, | |
y: 0, | |
width: size, |
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
<!--前略--> | |
<android xmlns:android="http://schemas.android.com/apk/res/android"> | |
<tool-api-level>8</tool-api-level> | |
<manifest android:versionCode="1" android:versionName="1.0" package="com.activate.mohh"> | |
<supports-screens android:anyDensity="true"/> | |
<uses-sdk android:minSdkVersion="8"/> | |
<receiver | |
android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"> | |
<intent-filter> | |
<action android:name="com.google.android.c2dm.intent.RECEIVE"/> |
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
#!/usr/bin/env ruby | |
dir = "#{ENV['HOME']}/Library/Application\ Support/Titanium/mobilesdk/osx/*GA" | |
sdk = "#{Dir.glob(dir).sort.last}/titanium.py" | |
exec "#{sdk.gsub(/ /, '\ ')} #{ARGV.join(" ")}" |
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
//試験を開始するWindowにて | |
var Window, window; | |
Window = require('ui/handheld/Question'); | |
window = new Window(1); | |
window.containingTab = self.containingTab; | |
self.containingTab.open(window); | |
//ui/handheld/Question.js | |
function Question(id){ | |
var self, button; |
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
//app.js excerpt | |
var ApplicationTabGroup; | |
if(Ti.Platform.osname == 'android'){ | |
ApplicationTabGroup = require('ui/common/AndroidTabGroup'); // <- これを追加 | |
}else{ | |
ApplicationTabGroup = require('ui/common/ApplicationTabGroup'); | |
} | |
new ApplicationTabGroup(Window).open(); | |
//ui/common/AndroidTabGroup.js |
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
<sdk-version>3.1.1.GA</sdk-version> | |
<modules> | |
<module platform="iphone">com.ti.calendar.permission</module> | |
</modules> |
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 rows = []; | |
var table = Ti.UI.createTableView({top: 20}); | |
for(var i = 0; i < 2; i++){ | |
var row = Ti.UI.createTableViewRow({ | |
id: row + i.toString(), title: i.toString(), height: 110 | |
}); | |
rows.push(row); | |
} | |
var views = []; | |
views.push(Ti.UI.createImageView({height: 100, width: Ti.UI.SIZE, image:'images/black-cat.jpg'})); |