aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml18
-rw-r--r--COPYING14
-rw-r--r--README138
-rw-r--r--default.properties11
-rw-r--r--res/drawable-hdpi/theme_icon.pngbin0 -> 4147 bytes
-rw-r--r--res/drawable-ldpi/theme_icon.pngbin0 -> 1723 bytes
-rw-r--r--res/drawable-mdpi/theme_icon.pngbin0 -> 2574 bytes
-rw-r--r--res/drawable/button_back.pngbin0 -> 433 bytes
-rw-r--r--res/drawable/button_background.pngbin0 -> 783 bytes
-rw-r--r--res/drawable/button_exit.pngbin0 -> 589 bytes
-rw-r--r--res/drawable/button_home.pngbin0 -> 588 bytes
-rw-r--r--res/drawable/button_menu.pngbin0 -> 402 bytes
-rw-r--r--res/drawable/button_popper.pngbin0 -> 531 bytes
-rw-r--r--res/drawable/button_search.pngbin0 -> 552 bytes
-rw-r--r--res/drawable/button_settings.pngbin0 -> 792 bytes
-rw-r--r--res/drawable/main_button_container_background.pngbin0 -> 225 bytes
-rw-r--r--res/values/theme_config.xml4
-rw-r--r--samples/drawable/button_bg.xml19
-rw-r--r--samples/layout/main_button_back.xml9
-rw-r--r--src/x/x/x/main.java11
20 files changed, 224 insertions, 0 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..d82288f
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="x.x.x"
+ android:versionCode="1"
+ android:versionName="1.0"
+ >
+ <application android:label="@string/theme_title" android:icon="@drawable/theme_icon">
+ <activity android:name=".main"
+ android:label="@string/theme_title">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="net.hoopajoo.android.SoftKeys.THEMES" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+ </application>
+ <uses-sdk android:minSdkVersion="4"/>
+</manifest>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..5a8e332
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,14 @@
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
diff --git a/README b/README
new file mode 100644
index 0000000..e57b2e5
--- /dev/null
+++ b/README
@@ -0,0 +1,138 @@
+SoftKeys Theme Template v1.0
+#################################################
+
+License:
+-------------------------------------------------
+/* This program is free software. It comes without any warranty, to
+ * the extent permitted by applicable law. You can redistribute it
+ * and/or modify it under the terms of the Do What The Fuck You Want
+ * To Public License, Version 2, as published by Sam Hocevar. See
+ * http://sam.zoy.org/wtfpl/COPYING for more details. */
+
+Usage instructions:
+-------------------------------------------------
+1.-Load the template into eclipse:
+ 1.a-On eclipse, select new android project
+ 1.b-On the new project screen, select "Project from existing source" and select the theme template dir.
+ 1.c-Click finish.
+
+2.-Modify the app packagename and path (you should change if from x.x.x to your.package.name)
+ 2.a-On eclipse, look into your project explorer, rightclick the x.x.x package and select "Refactor->Rename..." and follow the instructions.
+
+3.-Editing the AndroidManifest.xml:
+ 3.a-EDIT ONLY the packagename AND versioncode/versionname to suit your needs.
+ 3.b-If you remove/change the installLocation param, your theme could not be loaded on boot on froyo phones.
+ 3.c-If you remove/change the "net.hoopajoo.android.SoftKeys.THEMES" intent filter and/or the "android.intent.category.DEFAULT" category, your theme won't be visible to SoftKeys users.
+ 3.d-This template is preconfigured to NOT show on the application drawer so users don't get bloated with theme icons on their app drawers.
+
+4.-Edit the res/values/theme_config.xml to your needs.
+
+5.-Edit the different drawables in there.
+
+6.-For advanced theming you can also create custom layouts
+
+7.-Export the apk from eclipse as every other android app.
+
+Quick start:
+-------------------------------------------------
+
+For simple themes you just need to create the new icons you want and name
+them:
+
+res/drawable/button_back.png
+res/drawable/button_home.png
+res/drawable/button_menu.png
+res/drawable/button_search.png
+res/drawable/button_settings.png
+res/drawable/button_exit.png
+
+for the button background:
+
+res/drawable/button_background.png
+
+How themes are applied:
+-------------------------------------------------
+
+The interface is built up at runtime from chunks, using the most specific
+resource when available. The main interface bound to the home button is
+composed of the button container and the soft key buttons. For basic
+theming like just changing the button backgrounds and icons you can just
+create some drawables.
+
+Drawables for buttons are built up using the most specific resource of:
+
+Foreground icon:
+ main_button_<button name>
+ main_button
+ button_<button name>
+ button
+
+Background drawable:
+ main_button_background_<button name>
+ main_button_background
+ button_background_<button name>
+ button_background
+
+Button names are:
+
+ back
+ home
+ menu
+ search
+ settings
+ exit
+
+So for example if you wanted to make a common background for all buttons in
+the main window, create a main_button_background drawable (xml or png or
+whatever). Then if you wanted to make the home button have a different
+background you could create a main_button_background_home. If you used
+all png drawables you would have these files:
+
+res/drawable/main_button_background.png
+res/drawable/main_button_background_home.png
+
+For more advanced changes you can modify the padding or anything else from
+an xml layout by creating a layout named the same as the foreground icon,
+so if you wanted to do something special with the home button you could
+create:
+
+res/layout/main_button_home.xml
+
+This layout should contain just an imagebutton. There is a sample in the
+samples/ directory.
+
+If you want to change the button container background you can specify a
+custom 9 patch or just a background image or modify the xml, in the same
+was as the buttons. The naming for the button container is:
+
+ main_button_container
+ button_container
+
+You can also specify a background in the same way as a drawable without
+making custom xml using:
+
+ main_button_container_background
+ button_container_background
+
+For the service window popup it works the same way but everything is
+prefixed with service_ instead of main_, e.g. the home button in the
+service window is:
+
+ service_button_home
+
+If you want to use the same icons for both, you can omit the prefix. So to
+use the same icons for home in the service window and the main window just
+create:
+
+res/drawable/button_home.png
+
+Then it will be used in both places.
+
+To theme the button that triggers the service popup use:
+
+ service_button_popper
+
+e.g. you can make it not be the main icon by creating a png:
+
+res/drawable/service_button_popper.png
+
diff --git a/default.properties b/default.properties
new file mode 100644
index 0000000..9d79b12
--- /dev/null
+++ b/default.properties
@@ -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,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-4
diff --git a/res/drawable-hdpi/theme_icon.png b/res/drawable-hdpi/theme_icon.png
new file mode 100644
index 0000000..8074c4c
--- /dev/null
+++ b/res/drawable-hdpi/theme_icon.png
Binary files differ
diff --git a/res/drawable-ldpi/theme_icon.png b/res/drawable-ldpi/theme_icon.png
new file mode 100644
index 0000000..1095584
--- /dev/null
+++ b/res/drawable-ldpi/theme_icon.png
Binary files differ
diff --git a/res/drawable-mdpi/theme_icon.png b/res/drawable-mdpi/theme_icon.png
new file mode 100644
index 0000000..a07c69f
--- /dev/null
+++ b/res/drawable-mdpi/theme_icon.png
Binary files differ
diff --git a/res/drawable/button_back.png b/res/drawable/button_back.png
new file mode 100644
index 0000000..464ec85
--- /dev/null
+++ b/res/drawable/button_back.png
Binary files differ
diff --git a/res/drawable/button_background.png b/res/drawable/button_background.png
new file mode 100644
index 0000000..523297d
--- /dev/null
+++ b/res/drawable/button_background.png
Binary files differ
diff --git a/res/drawable/button_exit.png b/res/drawable/button_exit.png
new file mode 100644
index 0000000..0dfd642
--- /dev/null
+++ b/res/drawable/button_exit.png
Binary files differ
diff --git a/res/drawable/button_home.png b/res/drawable/button_home.png
new file mode 100644
index 0000000..50c1083
--- /dev/null
+++ b/res/drawable/button_home.png
Binary files differ
diff --git a/res/drawable/button_menu.png b/res/drawable/button_menu.png
new file mode 100644
index 0000000..a8dae86
--- /dev/null
+++ b/res/drawable/button_menu.png
Binary files differ
diff --git a/res/drawable/button_popper.png b/res/drawable/button_popper.png
new file mode 100644
index 0000000..f91ebce
--- /dev/null
+++ b/res/drawable/button_popper.png
Binary files differ
diff --git a/res/drawable/button_search.png b/res/drawable/button_search.png
new file mode 100644
index 0000000..1783dae
--- /dev/null
+++ b/res/drawable/button_search.png
Binary files differ
diff --git a/res/drawable/button_settings.png b/res/drawable/button_settings.png
new file mode 100644
index 0000000..20d0097
--- /dev/null
+++ b/res/drawable/button_settings.png
Binary files differ
diff --git a/res/drawable/main_button_container_background.png b/res/drawable/main_button_container_background.png
new file mode 100644
index 0000000..672d8b8
--- /dev/null
+++ b/res/drawable/main_button_container_background.png
Binary files differ
diff --git a/res/values/theme_config.xml b/res/values/theme_config.xml
new file mode 100644
index 0000000..dbbe7f3
--- /dev/null
+++ b/res/values/theme_config.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+<string name="theme_title">SoftKeys Theme Template</string>
+</resources>
diff --git a/samples/drawable/button_bg.xml b/samples/drawable/button_bg.xml
new file mode 100644
index 0000000..dd54065
--- /dev/null
+++ b/samples/drawable/button_bg.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true">
+ <shape android:shape="rectangle">
+ <gradient
+ android:startColor="#111"
+ android:endColor="#000"
+ />
+ </shape>
+ </item>
+ <item>
+ <shape android:shape="rectangle">
+ <gradient
+ android:startColor="#111"
+ android:endColor="#222"
+ />
+ </shape>
+ </item>
+</selector>
diff --git a/samples/layout/main_button_back.xml b/samples/layout/main_button_back.xml
new file mode 100644
index 0000000..b356bf6
--- /dev/null
+++ b/samples/layout/main_button_back.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
+ android:background="@drawable/button_bg"
+ android:padding="5dip"
+ android:gravity="center"
+ android:layout_weight="1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+/>
diff --git a/src/x/x/x/main.java b/src/x/x/x/main.java
new file mode 100644
index 0000000..c04b014
--- /dev/null
+++ b/src/x/x/x/main.java
@@ -0,0 +1,11 @@
+package x.x.x;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class main extends Activity {
+ /** Called when the activity is first created. */
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ }
+}