Creating Themes
Quick Start, Download the WLTheme Base Pack and start editing the images. Come back here when you have trouble with the _3.png files.
Themes for WidgetLocker are simple zip files containing the replacement slider images. The name of the theme is taking from the file name. Themes must include a preview image for each slider style (Android, Motorla, iPhone, Sense, Rotary) that is supported. For example to create an iPhone like theme that looks like this:
We would need 4 image files:
Tells WidgetLocker that iPhone style is supported, and displayed to the user in the "Select theme" menu.iphone_preview.png
iphone_background_3.png - This is the background image for the iPhone slider. Note that this isĀ stretchable, this image is a ThreePatch Image, described below!
ThreePatch Images The images need to be stretchable for a few reasons:
- WidgetLocker supports phones and tablets of many screen sizes and ratios
- Users may resize the slider
- The slider may be used horizontally in landscape mode, or vertically in portrait mode.
- Three versus Nine. Nine-Patches are ideal for button like images, where the corners are most important and the middles can be stretched. Three patches are ideal for images which can stretch in one direction but should be scaled (maintaining the aspect ratio) in the other.
- NinePatches can't (easily) be included in themes unless the theme is built as an APK file, rather than a zip file.


The left shows a (hideous) example of how a nine-patch might scale the Motorola slider. The right shows an example of how the ThreePatch can. Note that it's not just the white arrow that is deformed in the NinePatch, but also the curve of the slider is lost and the gradient and the diagonal between the two colors.
When editing a ThreePatch you may freely increase the width of the image. However the wider you make it the more likely it is to be scaled down if the user is on a smaller screen or resizes the slider. For this reason, it's advisable to make the image as narrow as possible.
An example of a wider ThreePatch is the PacMan Theme. Here the iphone_background_3.png looks like this:
Note it's stretch mark is on the left hand side right before the white dots start. This means on a tablet it might look like this:
And on a phone:
To get started, you can download the Base Pack which includes wlthemes for each slider style using the default (widgetlocker) images.
For more examples check the Negate themes in the directory listing