Theme How-to

Welcome to the keeworld theme how-to. Here we will explain how to make a theme for keeworld.

Please note that right now, you will need to know how to use the Android SDK and build the simplest of an Android project in order to make a keeworld theme. If you do not know what this means and would like to try it out, please see the official Android SDK site first before reading the rest of this page. We plan to provide a tool in the future so that anyone can make themes for keeworld and are sorry for any current inconveniences this might incur.

Themes in keeworld are packaged in a way similar to widgets. This means that within one package, or one ‘application’ in the market, you can include multiple themes. This allows you to make theme packs for your users instead of releasing tens or individual themes that just flood the market. You are also able to package themes along-side a regular Android application in the same way as you can do with widgets.

Make a Single Theme

To make a theme in keeworld, you will need to create several files. They are listed here and explained below:

  • Your package AndroidManifest.xml,
  • a theme xml file that tells keeworld what images to use in your package,
  • and a fake activity that does nothing so Android knows your theme exists.

AndroidManifest.xml

As this is a required file for all Android applications you must have this file. It will tell the Android system that your theme exists and tell keeworld how to access your theme.

Besides the standard required sections of the file, you will need to add a new activity. This activity should be a dummy activity (meaning the java file is empty) as it will never be run. You’ll add a filter intent to the activity with an action and a category so that keeworld can find your theme. Finally you’ll add a meta-data tag to your activity that tells keeworld what xml configuration file to use to access your theme’s settings. Below is what a Manifest file would look like for a single theme.


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="your.unique.package.name.here"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity
android:name=".ThemeOne"
android:label="Theme One"
>
<intent-filter>
<action android:name="com.saora.keeworld.theme.action.details" />
<category android:name="com.saora.keeworld.theme" />
</intent-filter>
<meta-data android:name="com.saora.keeworld.theme.configresource" android:resource="@xml/theme" />
</activity>
</application>
<uses-sdk android:minSdkVersion="4" />
</manifest>

Anywhere you see ‘your.unique.package.name.here’ should be replaced with your own domain name (you can just make it up, it doesn’t have to be real, but it should be unique).

.ThemeOne should be replaced with the name of your fake activity (explained later).

@xml/theme is your actual theme file that keeworld will read. Change this to the name of the file you make for that theme.

The Fake Java Activity

In order for Android to recognize your theme, you must include an Activity as part of your theme. So you’ll create a new Java class that is an activity. Make sure you give the new Java class the same name as the name in the activity tag in your AndroidManifest.xml file. This file can be left alone and we will never do anything with it.

The Theme XML File

This is the heart of your theme. It is where you will tell keeworld what do display and where to display it. The format is the same as all other ‘values’ xml files in Android. If you are familiar to those, this will be easy for you.

Each item inside the file corresponds to a specific setting in keeworld. For example, if you wanted to set the wallpaper of your theme, you would use this code.


<item name="wallpaper" value="@drawable/wallpaper" />

The name of the item is wallpaper. Keeworld will see this name, and know that the following value will be the wallpaper for this theme. The value must be an Android Drawable (Any kind, not just an image). This uses the standard Android values syntax.

Below is the list of all current keeworld theme items that you can change. Use the items in this list as the ‘name’ as in the example above.

  • wallpaper
  • pocket_default_tl
  • pocket_default_tr
  • pocket_default_bl
  • pocket_active_tl
  • pocket_active_tr
  • pocket_active_bl
  • pocket_notification_tl
  • pocket_notification_tr
  • pocket_notification_bl
  • ribbon_loading
  • ribbon_default_tl
  • ribbon_default_tr
  • ribbon_default_bl
  • lock_default_bottom
  • lock_default_top
  • lock_locked_bottom
  • lock_locked_top
  • lock_over_bottom
  • lock_over_top
  • delete_widget_default
  • delete_widget_over
  • pocketin_applications
  • pocketin_customizer
  • pocketin_folders
  • pocketin_calllog
  • pocketin_contacts
  • pocketin_messages
  • pocketin_chat
  • pocketin_gmail
  • pocketin_sms
  • pocketin_facebook
  • pocketin_twitter
  • pocketin_videos
  • pocketin_music
  • pocketin_images
  • pocketin_application_loading
  • call_log_incoming
  • call_log_missed
  • call_log_outgoing
  • pocketin_chat_item
  • pocketin_contacts_loading
  • pocketin_gmail_read
  • pocketin_gmail_unread
  • pocketin_images_loading
  • pocketin_music_loading
  • pocketin_sms_item
  • pocketin_videos_loading
  • pocketin_facebook_event
  • pocketin_facebook_image
  • pocketin_facebook_item
  • pocketin_facebook_link
  • pocketin_facebook_video
  • pocketin_twitter_item

Note that you do not need to replace all of these. Anything you do not replace will just simply show the keeworld default theme’s image.

Android is a very diverse platform and supports many different screen sizes and densities. In order to make your theme work for any screen size you might encounter in the wild, you need to make three versions of all your images. All the information you could ever want on this can be found here: http://developer.android.com/guide/practices/screens_support.html.

With that, you export an apk file as you would a normal Android application and install it. No more work is required.

We plan on adding much more power to the theme engine in keeworld, like customizing colours, application icons, fonts and more. In due time, we will provide these features to you.

Leave a Reply

Thank you for visiting. Please let us know what you think of this page/application.
Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>