ads

dimanche 20 septembre 2015

[TUT]Developing G3/G4 TweaksBox softkey themes



Starting from 1.5 version G3 TWB supports softkey themes. G4 TWB has the support from its first release. Softkey themes are the same for both the G3 and the G4.

Follow these steps to create a theme:

1)DOWNLOAD THE THEME EXAMPLE ATTACHED TO THIS POST AND DECOMPILE IT

You can easily use apktool for that.

2)MODIFY THE PACKAGE NAME:

Don't touch anything else in the MANIFEST file.


Code:


<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="it.ptoti.g3_tweaksbox_navbar_theme.iron_man" platformBuildVersionCode="21" platformBuildVersionName="APKTOOL">
    <application android:allowBackup="true" android:icon="@drawable/theme_icon" android:label="@string/theme_name" android:theme="@android:style/Theme.Light">
        <activity android:excludeFromRecents="true" android:launchMode="singleInstance" android:name="it.ptoti.g3_tweaksbox.navigationbartheme.ThemeActivity">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT"/>
                <action android:name="it.ptoti.g3_tweaksbox.navbar.THEME"/>
            </intent-filter>
        </activity>
    </application>
</manifest>


3)CHANGE THE THEME NAME:

Open the strings.xml file(res/values/) and change the theme name


Code:


<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="theme_name">Iron Man Red</string>
</resources>


4)REPLACING RESOURCES:

Just replace your themed pngs in the xxx-hdpi folder.There is a png for each key to theme.



5)COMPILE THE THEME WITH APKTOOL,SIGN AND ENJOY IT:

I will add an eclipse/Android studio example soon.

CREDITS:
@HPTesla for the iron man pngs.














Attached Files






File Type: apk Iron_Man_Red_Softkeys.apk -
[Click for QR Code]
(573.0 KB)







Aucun commentaire:

Enregistrer un commentaire