Skip to content

Commit

Permalink
initial android merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Haynie committed Feb 4, 2010
1 parent 069a925 commit a90cd6d
Show file tree
Hide file tree
Showing 131 changed files with 14,139 additions and 0 deletions.
8 changes: 8 additions & 0 deletions android/.classpath
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="lib" path="lib/js.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
2 changes: 2 additions & 0 deletions android/.gitignore
@@ -0,0 +1,2 @@
bin
gen
33 changes: 33 additions & 0 deletions android/.project
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>androidng</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
43 changes: 43 additions & 0 deletions android/AndroidManifest.xml
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appcelerator.androidng"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:name=".TitaniumNGApplication"
android:debuggable="true"
>
<activity android:name=".TitaniumNGActivity"
android:label="@string/app_name"
android:theme="@style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTask"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name="org.appcelerator.titanium.TiActivity"
android:configChanges="keyboardHidden|orientation"
/>
<activity
android:name="ti.modules.titanium.map.TiMapActivity"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTask"
/>
<uses-library android:name="com.google.android.maps" />

</application>
<uses-sdk android:minSdkVersion="3" />


<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

</manifest>
71 changes: 71 additions & 0 deletions android/assets/Resources/accelerometer.js
@@ -0,0 +1,71 @@
var win = Ti.UI.createWindow({
backgroundColor : '#081d35'
});

var l1 = Ti.UI.createLabel({
top : '5px', left : '10px', width : '20px', height : '20px',
text : 'X:',
color : 'white',
font : 'sans-serif',
fontWeight : 'bold',
textAlignment : Ti.UI.TEXT_ALIGNMENT_LEFT
});

var vx = Ti.UI.createLabel({
top : '5px', left : '35px', width : '200px', height : '20px',
color : 'black',
backgroundColor : 'white',
font : 'monospace',
fontWeight : 'bold',
textAlignment : Ti.UI.TEXT_ALIGNMENT_RIGHT
});

var l2 = Ti.UI.createLabel({
top : '30px', left : '10px', width : '20px', height : '20px',
text : 'Y:',
color : 'white',
font : 'sans-serif',
fontWeight : 'bold',
textAlignment : Ti.UI.TEXT_ALIGNMENT_LEFT
});

var vy = Ti.UI.createLabel({
top : '30px', left : '35px', width : '200px', height : '20px',
color : 'black',
backgroundColor : 'white',
font : 'monospace',
fontWeight : 'bold',
textAlignment : Ti.UI.TEXT_ALIGNMENT_RIGHT
});

var l3 = Ti.UI.createLabel({
top : '55px', left : '10px', width : '20px', height : '20px',
text : 'Z:',
color : 'white',
font : 'sans-serif',
fontWeight : 'bold',
textAlignment : Ti.UI.TEXT_ALIGNMENT_LEFT
});

var vz = Ti.UI.createLabel({
top : '55px', left : '35px', width : '200px', height : '20px',
color : 'black',
backgroundColor : 'white',
font : 'monospace',
fontWeight : 'bold',
textAlignment : Ti.UI.TEXT_ALIGNMENT_RIGHT
});

win.add(l1);
win.add(vx);
win.add(l2);
win.add(vy);
win.add(l3);
win.add(vz);
win.open();

Ti.Accelerometer.addEventListener('update', function(e) {
vx.text = e.x;
vy.text = e.y;
vz.text = e.z;
});

0 comments on commit a90cd6d

Please sign in to comment.