diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/AndroidManifest.alias.template | 19 | ||||
| -rw-r--r-- | templates/AndroidManifest.template | 15 | ||||
| -rw-r--r-- | templates/AndroidManifest.tests.template | 21 | ||||
| -rw-r--r-- | templates/alias.template | 9 | ||||
| -rw-r--r-- | templates/build.alias.template | 23 | ||||
| -rw-r--r-- | templates/build.template | 67 | ||||
| -rw-r--r-- | templates/icon_hdpi.png | bin | 0 -> 4147 bytes | |||
| -rw-r--r-- | templates/icon_ldpi.png | bin | 0 -> 1723 bytes | |||
| -rw-r--r-- | templates/icon_mdpi.png | bin | 0 -> 2574 bytes | |||
| -rw-r--r-- | templates/java_file.template | 15 | ||||
| -rw-r--r-- | templates/java_tests_file.template | 21 | ||||
| -rw-r--r-- | templates/layout.template | 13 | ||||
| -rw-r--r-- | templates/strings.template | 4 |
13 files changed, 207 insertions, 0 deletions
diff --git a/templates/AndroidManifest.alias.template b/templates/AndroidManifest.alias.template new file mode 100644 index 0000000..6606d3d --- /dev/null +++ b/templates/AndroidManifest.alias.template @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +ALIAS PROJECTS ARE CURRENT NOT SUPPORTED. +THIS FILE IS CURRENTLY BROKEN AND SHOULD NOT BE USED. +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="PACKAGE" + android:versionCode="1" + android:versionName="1.0"> + <application android:hasCode="false"> + <activity android:name="android.app.AliasActivity" android:label="@string/app_name"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + <meta-data android:name="android.app.alias" android:resource="@xml/alias" /> + </activity> + </application> +</manifest> diff --git a/templates/AndroidManifest.template b/templates/AndroidManifest.template new file mode 100644 index 0000000..f14f147 --- /dev/null +++ b/templates/AndroidManifest.template @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="PACKAGE" + android:versionCode="1" + android:versionName="1.0"> + <application android:label="@string/app_name" ICON> + <activity android:name="ACTIVITY_ENTRY_NAME" + android:label="@string/app_name"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> +</manifest> diff --git a/templates/AndroidManifest.tests.template b/templates/AndroidManifest.tests.template new file mode 100644 index 0000000..c74ff6d --- /dev/null +++ b/templates/AndroidManifest.tests.template @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us --> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="PACKAGE.tests" + android:versionCode="1" + android:versionName="1.0"> + <!-- We add an application tag here just so that we can indicate that + this package needs to link against the android.test library, + which is needed when building test cases. --> + <application> + <uses-library android:name="android.test.runner" /> + </application> + <!-- + This declares that this application uses the instrumentation test runner targeting + the package of PACKAGE. To run the tests use the command: + "adb shell am instrument -w PACKAGE.tests/android.test.InstrumentationTestRunner" + --> + <instrumentation android:name="android.test.InstrumentationTestRunner" + android:targetPackage="PACKAGE" + android:label="Tests for PACKAGE"/> +</manifest> diff --git a/templates/alias.template b/templates/alias.template new file mode 100644 index 0000000..14899ce --- /dev/null +++ b/templates/alias.template @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +ALIAS PROJECTS ARE CURRENT NOT SUPPORTED. +THIS FILE IS CURRENTLY BROKEN AND SHOULD NOT BE USED. +--> +<alias xmlns:android="http://schemas.android.com/apk/res/android"> + <intent android:action="android.intent.action.VIEW" + android:data="ALIASDATA"/> +</alias>
\ No newline at end of file diff --git a/templates/build.alias.template b/templates/build.alias.template new file mode 100644 index 0000000..d051405 --- /dev/null +++ b/templates/build.alias.template @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +ALIAS PROJECTS ARE CURRENT NOT SUPPORTED. +THIS FILE IS CURRENTLY BROKEN AND SHOULD NOT BE USED. +--> +<project name="PROJECT_NAME" default="package"> + + <!-- The build.properties file can be created by you and is never touched + by activitycreator. If you want to manually set properties, this is + the best place to set them. --> + <property file="build.properties" /> + + <!-- The default.properties file is created and updated by activitycreator. + It will set any properties not already defined by build.properties. --> + <property file="default.properties" /> + + <!-- ************************************************************************************* --> + <!-- Import the default Android build rules. + This requires ant 1.6.0 or above. --> + + <import file="${sdk.dir}/tools/lib/alias_rules.xml" /> + +</project> diff --git a/templates/build.template b/templates/build.template new file mode 100644 index 0000000..3959c57 --- /dev/null +++ b/templates/build.template @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="PROJECT_NAME" default="help"> + + <!-- The local.properties file is created and updated by the 'android' tool. + It contains the path to the SDK. It should *NOT* be checked in in Version + Control Systems. --> + <property file="local.properties" /> + + <!-- The build.properties file can be created by you and is never touched + by the 'android' tool. This is the place to change some of the default property values + used by the Ant rules. + Here are some properties you may want to change/update: + + application.package + the name of your application package as defined in the manifest. Used by the + 'uninstall' rule. + source.dir + the name of the source directory. Default is 'src'. + out.dir + the name of the output directory. Default is 'bin'. + + Properties related to the SDK location or the project target should be updated + using the 'android' tool with the 'update' action. + + This file is an integral part of the build system for your application and + should be checked in in Version Control Systems. + + --> + <property file="build.properties" /> + + <!-- The default.properties file is created and updated by the 'android' tool, as well + as ADT. + This file is an integral part of the build system for your application and + should be checked in in Version Control Systems. --> + <property file="default.properties" /> + + <!-- Custom Android task to deal with the project target, and import the proper rules. + This requires ant 1.6.0 or above. --> + <path id="android.antlibs"> + <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" /> + <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" /> + <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" /> + <pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" /> + <pathelement path="${sdk.dir}/tools/lib/jarutils.jar" /> + </path> + + <taskdef name="setup" + classname="com.android.ant.SetupTask" + classpathref="android.antlibs" /> + + <!-- Execute the Android Setup task that will setup some properties specific to the target, + and import the build rules files. + + The rules file is imported from + <SDK>/platforms/<target_platform>/templates/android_rules.xml + + To customize some build steps for your project: + - copy the content of the main node <project> from android_rules.xml + - paste it in this build.xml below the <setup /> task. + - disable the import by changing the setup task below to <setup import="false" /> + + This will ensure that the properties are setup correctly but that your customized + build steps are used. + --> + <setup /> + +</project> diff --git a/templates/icon_hdpi.png b/templates/icon_hdpi.png Binary files differnew file mode 100644 index 0000000..8074c4c --- /dev/null +++ b/templates/icon_hdpi.png diff --git a/templates/icon_ldpi.png b/templates/icon_ldpi.png Binary files differnew file mode 100644 index 0000000..1095584 --- /dev/null +++ b/templates/icon_ldpi.png diff --git a/templates/icon_mdpi.png b/templates/icon_mdpi.png Binary files differnew file mode 100644 index 0000000..a07c69f --- /dev/null +++ b/templates/icon_mdpi.png diff --git a/templates/java_file.template b/templates/java_file.template new file mode 100644 index 0000000..19714a8 --- /dev/null +++ b/templates/java_file.template @@ -0,0 +1,15 @@ +package PACKAGE; + +import android.app.Activity; +import android.os.Bundle; + +public class ACTIVITY_CLASS_NAME extends Activity +{ + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + } +} diff --git a/templates/java_tests_file.template b/templates/java_tests_file.template new file mode 100644 index 0000000..08d6f9b --- /dev/null +++ b/templates/java_tests_file.template @@ -0,0 +1,21 @@ +package PACKAGE; + +import android.test.ActivityInstrumentationTestCase2; + +/** + * This is a simple framework for a test of an Application. See + * {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on + * how to write and extend Application tests. + * <p/> + * To run this test, you can type: + * adb shell am instrument -w \ + * -e class ACTIVITY_FQ_NAME \ + * PACKAGE.tests/android.test.InstrumentationTestRunner + */ +public class ACTIVITY_CLASS_NAME extends ActivityInstrumentationTestCase2<ACTIVITY_TESTED_CLASS_NAME> { + + public ACTIVITY_CLASS_NAME() { + super("PACKAGE", ACTIVITY_TESTED_CLASS_NAME.class); + } + +}
\ No newline at end of file diff --git a/templates/layout.template b/templates/layout.template new file mode 100644 index 0000000..f5e367c --- /dev/null +++ b/templates/layout.template @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + > +<TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="Hello World, ACTIVITY_ENTRY_NAME" + /> +</LinearLayout> + diff --git a/templates/strings.template b/templates/strings.template new file mode 100644 index 0000000..ee5af40 --- /dev/null +++ b/templates/strings.template @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="app_name">ACTIVITY_ENTRY_NAME</string> +</resources> |
