First steps with Android.
authorgumartinm <gu.martinm@gmail.com>
Wed, 23 Nov 2011 02:22:56 +0000 (03:22 +0100)
committergumartinm <gu.martinm@gmail.com>
Wed, 23 Nov 2011 02:22:56 +0000 (03:22 +0100)
Playing with activities and tasks.

Android/Testing/Test1/AndroidManifest.xml [new file with mode: 0644]
Android/Testing/Test1/gen/de/android/test1/R.java [new file with mode: 0644]
Android/Testing/Test1/proguard.cfg [new file with mode: 0644]
Android/Testing/Test1/project.properties [new file with mode: 0644]
Android/Testing/Test1/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
Android/Testing/Test1/res/drawable-ldpi/ic_launcher.png [new file with mode: 0644]
Android/Testing/Test1/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
Android/Testing/Test1/res/layout/main.xml [new file with mode: 0644]
Android/Testing/Test1/res/values/strings.xml [new file with mode: 0644]
Android/Testing/Test1/src/de/android/test1/Test1Activity.java [new file with mode: 0644]

diff --git a/Android/Testing/Test1/AndroidManifest.xml b/Android/Testing/Test1/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..0084493
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="de.android.test1"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk android:minSdkVersion="14" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name" >
+        <activity
+            android:label="@string/app_name"
+            android:name=".Test1Activity" >
+            <intent-filter >
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
\ No newline at end of file
diff --git a/Android/Testing/Test1/gen/de/android/test1/R.java b/Android/Testing/Test1/gen/de/android/test1/R.java
new file mode 100644 (file)
index 0000000..34d4ccc
--- /dev/null
@@ -0,0 +1,27 @@
+/* AUTO-GENERATED FILE.  DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found.  It
+ * should not be modified by hand.
+ */
+
+package de.android.test1;
+
+public final class R {
+    public static final class attr {
+    }
+    public static final class drawable {
+        public static final int ic_launcher=0x7f020000;
+    }
+    public static final class id {
+        public static final int ok=0x7f050000;
+    }
+    public static final class layout {
+        public static final int main=0x7f030000;
+    }
+    public static final class string {
+        public static final int app_name=0x7f040001;
+        public static final int button_ok=0x7f040002;
+        public static final int hello=0x7f040000;
+    }
+}
diff --git a/Android/Testing/Test1/proguard.cfg b/Android/Testing/Test1/proguard.cfg
new file mode 100644 (file)
index 0000000..b1cdf17
--- /dev/null
@@ -0,0 +1,40 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+    native <methods>;
+}
+
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers class * extends android.app.Activity {
+   public void *(android.view.View);
+}
+
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+  public static final android.os.Parcelable$Creator *;
+}
diff --git a/Android/Testing/Test1/project.properties b/Android/Testing/Test1/project.properties
new file mode 100644 (file)
index 0000000..730e911
--- /dev/null
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-14
diff --git a/Android/Testing/Test1/res/drawable-hdpi/ic_launcher.png b/Android/Testing/Test1/res/drawable-hdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..8074c4c
Binary files /dev/null and b/Android/Testing/Test1/res/drawable-hdpi/ic_launcher.png differ
diff --git a/Android/Testing/Test1/res/drawable-ldpi/ic_launcher.png b/Android/Testing/Test1/res/drawable-ldpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..1095584
Binary files /dev/null and b/Android/Testing/Test1/res/drawable-ldpi/ic_launcher.png differ
diff --git a/Android/Testing/Test1/res/drawable-mdpi/ic_launcher.png b/Android/Testing/Test1/res/drawable-mdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..a07c69f
Binary files /dev/null and b/Android/Testing/Test1/res/drawable-mdpi/ic_launcher.png differ
diff --git a/Android/Testing/Test1/res/layout/main.xml b/Android/Testing/Test1/res/layout/main.xml
new file mode 100644 (file)
index 0000000..a372bc4
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:gravity="right"
+    android:orientation="vertical" >
+
+    <TextView
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/hello" />
+
+    <Button
+        android:id="@+id/ok"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="right"
+        android:onClick="onClickOk"
+        android:text="@string/button_ok" />
+    
+</LinearLayout>
\ No newline at end of file
diff --git a/Android/Testing/Test1/res/values/strings.xml b/Android/Testing/Test1/res/values/strings.xml
new file mode 100644 (file)
index 0000000..35276bb
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <string name="hello">Hello World, Test1Activity!</string>
+    <string name="app_name">Test1</string>
+    <string name="button_ok">OK</string>
+    
+
+</resources>
\ No newline at end of file
diff --git a/Android/Testing/Test1/src/de/android/test1/Test1Activity.java b/Android/Testing/Test1/src/de/android/test1/Test1Activity.java
new file mode 100644 (file)
index 0000000..420eb67
--- /dev/null
@@ -0,0 +1,18 @@
+package de.android.test1;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+
+public class Test1Activity extends Activity {
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main);
+    }
+    
+    public void onClickOk(View v) {
+        
+    }
+}
\ No newline at end of file