[TUT]Developing G3/G4 TweaksBox softkey themes

P_Toti

Senior Member
Jun 21, 2012
2,020
6,469
0
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=[COLOR="Red"]"it.ptoti.g3_tweaksbox_navbar_theme.iron_man[/COLOR]" 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">[COLOR="Red"]Iron Man Red[/COLOR]</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.
 

Attachments

Last edited:

Rom

Senior Member
Jul 1, 2013
2,493
1,037
193
Lyon
hey, in your theme two icons where missing (qslide and dual) so i hope u will not use them :)
Heu thank you very much but after i apply this theme, i don't see the same icon buttons that in the screenshoot..

Normal ?

And can you give by MP your apk tool folder, where do you has put it (the location) and how you make it (i don't sure that i have understand the main thread :p) ?
EDIT: and your full path & java version too
I would like to can update multiple navbar theme :)
Thanks :good:
 

Attachments

Last edited:

sille

Senior Member
Oct 24, 2013
1,089
307
103
Amberg


it works for me ;)

For the decompile:

Go to this thread --> http://forum.xda-developers.com/showthread.php?t=2639400 <--
Download the ZIP, extract it... Copy the files u want to decompile in the IN Folder (the iron man theme on the first page). Copy the second theme u do want the icons from in the same folder and start the programm.

Click on Decompile and choose both apk.... After they have been decompiled go to the OUT folder and modify the things, that are mentioned on page 1. To copy the icons from the old to the new theme look in the folder where the old icons are located.

Look for the icons that are named like that: ic_sysbar_back_normal <- change that name to "back".
so u do for the rest of the icons... Copy paste it to your new decompiled APK, rename the folder to whatever and recompile and sign the package again.

Install it, activate it, have phun with it :)

Gesendet von meinem LG-H815 mit Tapatalk
 
Last edited:

Rom

Senior Member
Jul 1, 2013
2,493
1,037
193
Lyon


it works for me ;)

For the decompile:

Go to this thread --> http://forum.xda-developers.com/showthread.php?t=2639400 <--
Download the ZIP, extract it... Copy the files u want to decompile in the IN Folder (the iron man theme on the first page). Copy the second theme u do want the icons from in the same folder and start the programm.

Click on Decompile and choose both apk.... After they have been decompiled go to the OUT folder and modify the things, that are mentioned on page 1. To copy the icons from the old to the new theme look in the folder where the old icons are located.

Look for the icons that are named like that: ic_sysbar_back_normal <- change that name to "back".
so u do for the rest of the icons... Copy paste it to your new decompiled APK, rename the folder to whatever and recompile and sign the package again.

Install it, activate it, have phun with it :)

Gesendet von meinem LG-H815 mit Tapatalk
Thanks you very much but i am block to this:
" To copy the icons from the old to the new theme look in the folder where the old icons are located."
 

sille

Senior Member
Oct 24, 2013
1,089
307
103
Amberg
ok, lets take your old reflect theme as an example:

if u decompile that you have to go in the res folder.... look there for a folder where the icons are stored... in that case the folder is called drawable-xxhdpi-v4. Then look for the different items and rename them: ic_sysbar_back_normal -> back / ic_sysbar_qmemo_normal -> qmemo

afterwards just copy the icons to your iron man theme (res -> drawable-xxxhdpi) which u have already downloaded on the first page and decompiled it
 

Rom

Senior Member
Jul 1, 2013
2,493
1,037
193
Lyon
ok, lets take your old reflect theme as an example:

if u decompile that you have to go in the res folder.... look there for a folder where the icons are stored... in that case the folder is called drawable-xxhdpi-v4. Then look for the different items and rename them: ic_sysbar_back_normal -> back / ic_sysbar_qmemo_normal -> qmemo

afterwards just copy the icons to your iron man theme (res -> drawable-xxxhdpi) which u have already downloaded on the first page and decompiled it
I try to understand what i must make XD

But for the stock reflection theme, at the result, we have not the same icons in navbar from the theme in this thread rights ?
=> http://forum.xda-developers.com/showthread.php?t=2717736

I want to see the same buttons on my navbar after apply the theme :D..
 

sille

Senior Member
Oct 24, 2013
1,089
307
103
Amberg
did u activate it in the Tweakbox?


the apk is completely correct... i have the reflection navbar as u can see on the pic ;)
 
Last edited: