aboutsummaryrefslogtreecommitdiffstats
path: root/testapps
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-12-06 15:52:43 -0800
committerXavier Ducrohet <xav@android.com>2010-12-06 15:52:43 -0800
commit525ef2584a3d8e1d416852121112ed752bc7d497 (patch)
tree71995d681316f77da88cffea833ee6f473f62c79 /testapps
parent90b6045294b33e87e972a49f587f1e2e78686c9a (diff)
downloadsdk-525ef2584a3d8e1d416852121112ed752bc7d497.zip
sdk-525ef2584a3d8e1d416852121112ed752bc7d497.tar.gz
sdk-525ef2584a3d8e1d416852121112ed752bc7d497.tar.bz2
Update test apps and bundle them in the meta sdk.
- make it so that layout display something about the project, and possibly the result of calling out to class coming from jar files. - make the activity names on the launcher to be the name of the projects. Change-Id: I318255c3284337be28220df509630cfff4eae38b
Diffstat (limited to 'testapps')
-rw-r--r--testapps/basicLib/.classpath7
-rw-r--r--testapps/basicLib/.project33
-rw-r--r--testapps/basicLib/AndroidManifest.xml4
-rw-r--r--testapps/basicLib/res/values/strings.xml2
-rw-r--r--testapps/basicLibWithJar/.classpath8
-rw-r--r--testapps/basicLibWithJar/.project33
-rw-r--r--testapps/basicLibWithJar/AndroidManifest.xml5
-rw-r--r--testapps/basicLibWithJar/res/layout/main.xml3
-rw-r--r--testapps/basicLibWithJar/res/values/strings.xml2
-rw-r--r--testapps/basicLibWithJar/src/com/android/tests/basiclibwithjar/Main.java4
-rw-r--r--testapps/basicProject/res/values/strings.xml2
-rw-r--r--testapps/basicProjectWithJar/.classpath8
-rw-r--r--testapps/basicProjectWithJar/.project33
-rw-r--r--testapps/basicProjectWithJar/AndroidManifest.xml2
-rw-r--r--testapps/basicProjectWithJar/res/layout/main.xml3
-rw-r--r--testapps/basicProjectWithJar/res/values/strings.xml2
-rw-r--r--testapps/basicProjectWithJar/src/com/android/tests/basicprojectwithjar/Main.java10
-rw-r--r--testapps/basicProjectWithLib/.classpath10
-rw-r--r--testapps/basicProjectWithLib/.project45
-rw-r--r--testapps/basicProjectWithLib/AndroidManifest.xml8
-rw-r--r--testapps/basicProjectWithLib/default.properties2
-rw-r--r--testapps/basicProjectWithLib/res/values/strings.xml4
22 files changed, 208 insertions, 22 deletions
diff --git a/testapps/basicLib/.classpath b/testapps/basicLib/.classpath
new file mode 100644
index 0000000..609aa00
--- /dev/null
+++ b/testapps/basicLib/.classpath
@@ -0,0 +1,7 @@
+<?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="output" path="bin"/>
+</classpath>
diff --git a/testapps/basicLib/.project b/testapps/basicLib/.project
new file mode 100644
index 0000000..5c71aaf
--- /dev/null
+++ b/testapps/basicLib/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>basicLib</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>
diff --git a/testapps/basicLib/AndroidManifest.xml b/testapps/basicLib/AndroidManifest.xml
index 96c8aaa..a97b8df 100644
--- a/testapps/basicLib/AndroidManifest.xml
+++ b/testapps/basicLib/AndroidManifest.xml
@@ -3,9 +3,9 @@
package="com.android.tests.basiclib"
android:versionCode="1"
android:versionName="1.0">
- <application android:label="@string/app_name" android:icon="@drawable/icon">
+ <application android:icon="@drawable/icon" android:label="@string/basicLib_name">
<activity android:name="Main"
- android:label="@string/app_name">
+ android:label="@string/basicLib_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
diff --git a/testapps/basicLib/res/values/strings.xml b/testapps/basicLib/res/values/strings.xml
index 549e4ea..1bdf988 100644
--- a/testapps/basicLib/res/values/strings.xml
+++ b/testapps/basicLib/res/values/strings.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">Main</string>
+ <string name="basicLib_name">basicLib</string>
</resources>
diff --git a/testapps/basicLibWithJar/.classpath b/testapps/basicLibWithJar/.classpath
new file mode 100644
index 0000000..cc48f32
--- /dev/null
+++ b/testapps/basicLibWithJar/.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="libs/basicJar.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/testapps/basicLibWithJar/.project b/testapps/basicLibWithJar/.project
new file mode 100644
index 0000000..5bbb0f6
--- /dev/null
+++ b/testapps/basicLibWithJar/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>basicLibWithJar</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>
diff --git a/testapps/basicLibWithJar/AndroidManifest.xml b/testapps/basicLibWithJar/AndroidManifest.xml
index c8650f8..1a7e638 100644
--- a/testapps/basicLibWithJar/AndroidManifest.xml
+++ b/testapps/basicLibWithJar/AndroidManifest.xml
@@ -3,9 +3,8 @@
package="com.android.tests.basiclibwithjar"
android:versionCode="1"
android:versionName="1.0">
- <application android:label="@string/app_name" android:icon="@drawable/icon">
- <activity android:name="Main"
- android:label="@string/app_name">
+ <application android:icon="@drawable/icon" android:label="@string/basicLibWithJar_name">
+ <activity android:name="Main" android:label="@string/basicLibWithJar_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
diff --git a/testapps/basicLibWithJar/res/layout/main.xml b/testapps/basicLibWithJar/res/layout/main.xml
index b79cddb..5fefdd7 100644
--- a/testapps/basicLibWithJar/res/layout/main.xml
+++ b/testapps/basicLibWithJar/res/layout/main.xml
@@ -7,7 +7,8 @@
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="Hello World, Main"
+ android:text="basicLibWithJar"
+ android:id="@+id/text"
/>
</LinearLayout>
diff --git a/testapps/basicLibWithJar/res/values/strings.xml b/testapps/basicLibWithJar/res/values/strings.xml
index 549e4ea..1701887 100644
--- a/testapps/basicLibWithJar/res/values/strings.xml
+++ b/testapps/basicLibWithJar/res/values/strings.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">Main</string>
+ <string name="basicLibWithJar_name">basicLibWithJar</string>
</resources>
diff --git a/testapps/basicLibWithJar/src/com/android/tests/basiclibwithjar/Main.java b/testapps/basicLibWithJar/src/com/android/tests/basiclibwithjar/Main.java
index f973cc2..e45470b 100644
--- a/testapps/basicLibWithJar/src/com/android/tests/basiclibwithjar/Main.java
+++ b/testapps/basicLibWithJar/src/com/android/tests/basiclibwithjar/Main.java
@@ -4,6 +4,7 @@ import com.android.tests.basicjar.Foo;
import android.app.Activity;
import android.os.Bundle;
+import android.widget.TextView;
public class Main extends Activity
{
@@ -17,5 +18,8 @@ public class Main extends Activity
Foo foo = new Foo();
int a = foo.getRandomFoo();
+ TextView tv = (TextView) findViewById(R.id.text);
+ tv.setText("Random number from Jar: " + a);
+
}
}
diff --git a/testapps/basicProject/res/values/strings.xml b/testapps/basicProject/res/values/strings.xml
index 549e4ea..a7322d3 100644
--- a/testapps/basicProject/res/values/strings.xml
+++ b/testapps/basicProject/res/values/strings.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">Main</string>
+ <string name="app_name">basicProject</string>
</resources>
diff --git a/testapps/basicProjectWithJar/.classpath b/testapps/basicProjectWithJar/.classpath
new file mode 100644
index 0000000..cc48f32
--- /dev/null
+++ b/testapps/basicProjectWithJar/.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="libs/basicJar.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/testapps/basicProjectWithJar/.project b/testapps/basicProjectWithJar/.project
new file mode 100644
index 0000000..90bdb0c
--- /dev/null
+++ b/testapps/basicProjectWithJar/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>basicProjectWithJar</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>
diff --git a/testapps/basicProjectWithJar/AndroidManifest.xml b/testapps/basicProjectWithJar/AndroidManifest.xml
index 1a2b54c..b9ac56f 100644
--- a/testapps/basicProjectWithJar/AndroidManifest.xml
+++ b/testapps/basicProjectWithJar/AndroidManifest.xml
@@ -12,5 +12,5 @@
</intent-filter>
</activity>
</application>
- <uses-sdk android:minSdkVersion="AOSP" />
+ <uses-sdk android:minSdkVersion="AOSP"/>
</manifest>
diff --git a/testapps/basicProjectWithJar/res/layout/main.xml b/testapps/basicProjectWithJar/res/layout/main.xml
index b79cddb..1b7a6df 100644
--- a/testapps/basicProjectWithJar/res/layout/main.xml
+++ b/testapps/basicProjectWithJar/res/layout/main.xml
@@ -7,7 +7,8 @@
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="Hello World, Main"
+ android:text="basicProjectWithJar"
+ android:id="@+id/text"
/>
</LinearLayout>
diff --git a/testapps/basicProjectWithJar/res/values/strings.xml b/testapps/basicProjectWithJar/res/values/strings.xml
index 549e4ea..ca28ebd 100644
--- a/testapps/basicProjectWithJar/res/values/strings.xml
+++ b/testapps/basicProjectWithJar/res/values/strings.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">Main</string>
+ <string name="app_name">basicProjectWithJar</string>
</resources>
diff --git a/testapps/basicProjectWithJar/src/com/android/tests/basicprojectwithjar/Main.java b/testapps/basicProjectWithJar/src/com/android/tests/basicprojectwithjar/Main.java
index fdcc019..15e3b87 100644
--- a/testapps/basicProjectWithJar/src/com/android/tests/basicprojectwithjar/Main.java
+++ b/testapps/basicProjectWithJar/src/com/android/tests/basicprojectwithjar/Main.java
@@ -4,17 +4,19 @@ import com.android.tests.basicjar.Foo;
import android.app.Activity;
import android.os.Bundle;
+import android.widget.TextView;
-public class Main extends Activity
-{
+public class Main extends Activity {
/** Called when the activity is first created. */
@Override
- public void onCreate(Bundle savedInstanceState)
- {
+ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Foo foo = new Foo();
int a = foo.getRandomFoo();
+
+ TextView tv = (TextView) findViewById(R.id.text);
+ tv.setText("Random number from Jar: " + a);
}
}
diff --git a/testapps/basicProjectWithLib/.classpath b/testapps/basicProjectWithLib/.classpath
new file mode 100644
index 0000000..b39f2a4
--- /dev/null
+++ b/testapps/basicProjectWithLib/.classpath
@@ -0,0 +1,10 @@
+<?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="src" path="basicLib_src"/>
+ <classpathentry kind="src" path="basicLibWithJar_src"/>
+ <classpathentry kind="lib" path="/basicLibWithJar/libs/basicJar.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/testapps/basicProjectWithLib/.project b/testapps/basicProjectWithLib/.project
new file mode 100644
index 0000000..f6514f1
--- /dev/null
+++ b/testapps/basicProjectWithLib/.project
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>basicProjectWithLib</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>
+ <linkedResources>
+ <link>
+ <name>basicLibWithJar_src</name>
+ <type>2</type>
+ <locationURI>_android_basicLibWithJar_aa4247fe/src</locationURI>
+ </link>
+ <link>
+ <name>basicLib_src</name>
+ <type>2</type>
+ <locationURI>_android_basicLib_99a2bf77/src</locationURI>
+ </link>
+ </linkedResources>
+</projectDescription>
diff --git a/testapps/basicProjectWithLib/AndroidManifest.xml b/testapps/basicProjectWithLib/AndroidManifest.xml
index 052d387..0f9192a 100644
--- a/testapps/basicProjectWithLib/AndroidManifest.xml
+++ b/testapps/basicProjectWithLib/AndroidManifest.xml
@@ -3,16 +3,14 @@
package="com.android.tests.basicprojectwithlib"
android:versionCode="1"
android:versionName="1.0">
- <application android:label="@string/app_name" android:icon="@drawable/icon">
- <activity android:name="com.android.tests.basiclib.Main"
- android:label="@string/app_name">
+ <application android:icon="@drawable/icon" android:label="@string/full_app_name">
+ <activity android:name="com.android.tests.basiclib.Main" android:label="@string/basicLib_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="com.android.tests.basiclibwithjar.Main"
- android:label="@string/app_name">
+ <activity android:name="com.android.tests.basiclibwithjar.Main" android:label="@string/basicLibWithJar_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
diff --git a/testapps/basicProjectWithLib/default.properties b/testapps/basicProjectWithLib/default.properties
index 60423bf..7d1f949 100644
--- a/testapps/basicProjectWithLib/default.properties
+++ b/testapps/basicProjectWithLib/default.properties
@@ -11,4 +11,4 @@
target=android-AOSP
proguard.config=../proguard.config
android.library.reference.1=../basicLib
-android.library.reference.2=../basicLibWithJar \ No newline at end of file
+android.library.reference.2=../basicLibWithJar
diff --git a/testapps/basicProjectWithLib/res/values/strings.xml b/testapps/basicProjectWithLib/res/values/strings.xml
new file mode 100644
index 0000000..bdca683
--- /dev/null
+++ b/testapps/basicProjectWithLib/res/values/strings.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="full_app_name">basicProjectWithLib</string>
+</resources>