Permalink
Browse files

android: fix new examples + add configChanges required with latest sdks

  • Loading branch information...
1 parent 619d8a8 commit f6c01eaee692987518691b3ae5ae40683d7cb828 @arturoc arturoc committed Feb 13, 2013
@@ -6,22 +6,16 @@
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.android.toolchain.gcc.898517443" name="Release" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="com.android.toolchain.gcc.898517443.1887315853" name="/" resourcePath="">
<toolChain id="com.android.toolchain.gcc.1485392764" name="com.android.toolchain.gcc" superClass="com.android.toolchain.gcc">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.607397687" isAbstract="false" superClass="com.android.targetPlatform"/>
- <builder arguments="" cleanBuildTarget="CleanAndroid" command="make" id="com.android.builder.1043977411" incrementalBuildTarget="AndroidRelease" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder"/>
+ <builder cleanBuildTarget="AndroidClean" id="cdt.managedbuild.builder.gnu.cross.1064771285" incrementalBuildTarget="AndroidRelease" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="com.android.gcc.compiler.1716371911" name="Android GCC Compiler" superClass="com.android.gcc.compiler">
<inputType id="com.android.gcc.inputType.1288876143" superClass="com.android.gcc.inputType"/>
</tool>
@@ -38,22 +32,16 @@
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.android.toolchain.gcc.898517443.1692179379" name="Debug" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="com.android.toolchain.gcc.898517443.1692179379." name="/" resourcePath="">
<toolChain id="com.android.toolchain.gcc.1065244540" name="com.android.toolchain.gcc" superClass="com.android.toolchain.gcc">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.1950827678" isAbstract="false" superClass="com.android.targetPlatform"/>
- <builder arguments="" cleanBuildTarget="CleanAndroid" command="make" id="com.android.builder.1321623372" incrementalBuildTarget="AndroidDebug" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder"/>
+ <builder cleanBuildTarget="AndroidClean" id="cdt.managedbuild.builder.gnu.cross.1779887424" incrementalBuildTarget="AndroidDebug" managedBuildOn="false" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="com.android.gcc.compiler.1704257024" name="Android GCC Compiler" superClass="com.android.gcc.compiler">
<inputType id="com.android.gcc.inputType.431232555" superClass="com.android.gcc.inputType"/>
</tool>
@@ -69,10 +57,10 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="Release">
+ <configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/android3DModelLoaderExample"/>
</configuration>
- <configuration configurationName="Default">
+ <configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/android3DModelLoaderExample"/>
</configuration>
<configuration configurationName="Debug">
@@ -18,7 +18,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -1,29 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.android.toolchain.gcc.898517443">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.android.toolchain.gcc.898517443" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.android.toolchain.gcc.898517443" name="Release" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="com.android.toolchain.gcc.898517443.1887315853" name="/" resourcePath="">
<toolChain id="com.android.toolchain.gcc.1485392764" name="com.android.toolchain.gcc" superClass="com.android.toolchain.gcc">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.607397687" isAbstract="false" superClass="com.android.targetPlatform"/>
- <builder arguments="" cleanBuildTarget="CleanAndroid" command="make" id="com.android.builder.1043977411" incrementalBuildTarget="AndroidRelease" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder"/>
+ <builder cleanBuildTarget="AndroidClean" id="cdt.managedbuild.builder.gnu.cross.1740837463" incrementalBuildTarget="AndroidRelease" managedBuildOn="false" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="com.android.gcc.compiler.1716371911" name="Android GCC Compiler" superClass="com.android.gcc.compiler">
<inputType id="com.android.gcc.inputType.1288876143" superClass="com.android.gcc.inputType"/>
</tool>
@@ -40,22 +32,16 @@
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.android.toolchain.gcc.898517443.1692179379" name="Debug" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="com.android.toolchain.gcc.898517443.1692179379." name="/" resourcePath="">
<toolChain id="com.android.toolchain.gcc.1065244540" name="com.android.toolchain.gcc" superClass="com.android.toolchain.gcc">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.1950827678" isAbstract="false" superClass="com.android.targetPlatform"/>
- <builder arguments="" cleanBuildTarget="CleanAndroid" command="make" id="com.android.builder.1321623372" incrementalBuildTarget="AndroidDebug" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder"/>
+ <builder cleanBuildTarget="AndroidClean" id="cdt.managedbuild.builder.gnu.cross.842490159" incrementalBuildTarget="AndroidDebug" managedBuildOn="false" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="com.android.gcc.compiler.1704257024" name="Android GCC Compiler" superClass="com.android.gcc.compiler">
<inputType id="com.android.gcc.inputType.431232555" superClass="com.android.gcc.inputType"/>
</tool>
@@ -71,21 +57,24 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="Release">
+ <configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/androidFontExample"/>
</configuration>
- <configuration configurationName="Default">
+ <configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/androidFontExample"/>
</configuration>
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/androidFontExample"/>
</configuration>
</storageModule>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.android.toolchain.gcc.898517443;com.android.toolchain.gcc.898517443.1887315853;com.android.gcc.compiler.1716371911;com.android.gcc.inputType.1288876143">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.android.AndroidPerProjectProfile"/>
</scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.android.toolchain.gcc.898517443.1692179379;com.android.toolchain.gcc.898517443.1692179379.;com.android.gcc.compiler.1704257024;com.android.gcc.inputType.431232555">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.android.AndroidPerProjectProfile"/>
+ </scannerConfigBuildInfo>
</storageModule>
- <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cproject>
@@ -18,7 +18,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize" android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -13,25 +13,32 @@ void testApp::setup(){
//--------------------------------------------------------------
void testApp::update(){
accel = ofxAccelerometer.getForce();
- sprintf(buf[0],"g(x) = %0.2f",accel.x);
- sprintf(buf[1],"g(y) = %0.2f",accel.y);
- sprintf(buf[2],"g(z) = %0.2f",accel.z);
+ messages[0] = "g(x) = " + ofToString(accel.x,2);
+ messages[1] = "g(y) = " + ofToString(accel.y,2);
+ messages[2] = "g(z) = " + ofToString(accel.z,2);
normAccel = accel.getNormalized();
}
//--------------------------------------------------------------
void testApp::draw(){
ofSetColor(255,255,0);
- font.drawString(buf[0],10,24);
+ font.drawString(messages[0],10,font.stringHeight(messages[0])+20);
ofSetColor(255,0,255);
- font.drawString(buf[1],10,font.stringHeight(buf[0])+24);
+ font.drawString(messages[1],10,(font.stringHeight(messages[0])+20)*2);
+ ofSetColor(0,255,255);
+ font.drawString(messages[2],10,(font.stringHeight(messages[0])+20)*3);
+ ofPushMatrix();
ofTranslate(ofGetWidth()/2, ofGetHeight()/2);
ofSetColor(255,255,0);
ofLine(0,0,normAccel.x*ofGetWidth()/2,0);
ofSetColor(255,0,255);
ofLine(0,0,0,-normAccel.y*ofGetHeight()/2);
+ // we don't draw z as the perspective might be confusing
+ // but it's approximately one when the device is still and parallel
+ // to the ground
+ ofPopMatrix();
}
//--------------------------------------------------------------
@@ -35,5 +35,5 @@ class testApp : public ofxAndroidApp{
ofTrueTypeFont font;
ofVec3f accel, normAccel;
- char buf[3][64];
+ string messages[3];
};
@@ -15,7 +15,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation" android:screenOrientation="landscape">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize" android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -16,7 +16,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation" android:screenOrientation="portrait">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -18,7 +18,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -18,7 +18,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -17,7 +17,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -16,7 +16,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -16,7 +16,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -18,7 +18,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -18,7 +18,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -16,7 +16,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -16,7 +16,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -16,7 +16,7 @@
android:theme="@style/AppTheme" >
<activity
android:name=".OFActivity"
- android:label="@string/app_name" android:configChanges="orientation">
+ android:label="@string/app_name" android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Oops, something went wrong.

0 comments on commit f6c01ea

Please sign in to comment.