Update your theme project to the latest version of Theme Creator BETA

The Theme Creator BETA tool is still in development, and many things have changed since version 0.0.1 BETA. The current version is backwards compatible with themes created with Theme Creator.0.0.2 BETA and later, so no additional adaptation is required for your project to work. If you created your project with Theme Creator 0.0.1 BETA, some adaptation is required in order to work with any of the newer versions.

Follow the steps below to upgrade your theme project created with Theme Creator 0.0.1 BETA to be compatible with the latest version of the tool. For some of the steps, you need to have both versions of the tool installed on your computer.

Images

This is very easily upgraded. Link the exported images as described in step D on the page How to work with templates. Doing this just once will restore all images to your project.

Colors

Colors need to be upgraded manually. Looking at your project in Theme Creator version 0.0.1 BETA, copy all the hex color values to a text document. Then start the new tool (version 0.0.3 BETA) and apply the colors manually for each resource. You can also copy your theme project and open the copy in the old tool while having the original project open in the new tool. This way, you can copy the hex color values one by one from the old tool and insert into the new tool.

Theme icon

In the previous version of Theme Creator, a file called something like xxhdpi_theme_icon.png would be automatically included in your theme as the theme icon.This is no longer done automatically by the tool. The file now needs a skin_ prefix in the name. Rename it to something like skin_xxhdpi_theme_icon.png, and it will be detected when you use File > Scan for images. Instead of renaming the file, you can also open up Presentation > Icon in the Theme Creator and pick out the file using a file picker.

Version code

This section only applies if you have published your theme on Google Play using Theme Creator version 0.0.1 BETA.

The version code is how the Android system determines which one of two APK files is newer. This used to be set automatically based on the current time when you exported a theme from Theme Creator. However, that would actually produce invalid version codes after the year 2038. The new version of the tool instead begins at zero, and increases the version code by 1 each time you export an APK. This lets you export about 2 billion APK files before running out of numbers, so it should be future proof.

Any updates to a theme released on Google Play must have a larger version code than any previous versions. To find out the version code of your currently published application, go into the Google Play developer console. Click your application and then click the tab named “APK”. Below “CURRENT APK” you will see something like this:

VERSION
1430299669(1.0.0)

In this case, 1430299669 is the current version code. That means that the next version must have version code 1430299670 or higher. To make the Theme Creator produce an APK with this version code you must manually edit the project file. In your theme directory open the file located in the folder .project/metadata. It can look something like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <properties version="1">
        <projectProperties>
            <package value="com.mycompany.mytheme"/>
            <name value="My theme"/>
            <versionName value="1.0.0"/>
            <versionCode value="1"/>
        </projectProperties>
    </properties>

Change the value for versionCode to the version you want it to have. Continuing the example above, you should change it to 1430299670:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <properties version="1">
        <projectProperties>
            <package value="mynewbeta.theme"/>
            <name value="MyNewBetaTheme"/>
            <versionName value="1.0.0"/>
            <versionCode value="1430299670"/>
        </projectProperties>
    </properties>

Restart the Theme Creator and build an apk. It should now be produced with the correct version code.

Comments 0

Sort by:

Showing 0 of 0 comments. Show all comments