[TUT]Developing G3/G4 TweaksBox softkey themes

Search This thread

P_Toti

Senior Member
Jun 21, 2012
2,020
6,469
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

  • Iron_Man_Red_Softkeys.apk
    573 KB · Views: 1,141
Last edited:

S3V3N

Senior Member
Apr 14, 2009
2,135
7,290
Żagań
76a95de1ee2847b72e0dbf7171d37842.jpg


Gr8!

TapTap in 7 HD 3.3 by S3V3N for LG G4
 
  • Like
Reactions: I-IoLLoW

sille

Senior Member
Oct 24, 2013
1,131
325
Amberg
Google Pixel 5
Google Pixel 6 Pro

Attachments

  • Reflect_Theme.apk
    77.5 KB · Views: 588

Rom

Senior Member
Jul 1, 2013
2,574
1,064
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

  • Capture.JPG
    Capture.JPG
    21.9 KB · Views: 1,123
Last edited:

sille

Senior Member
Oct 24, 2013
1,131
325
Amberg
Google Pixel 5
Google Pixel 6 Pro
26479bf9c1e3d1a72b07f278f3445e88.jpg


it works for me ;)

For the decompile:

Go to this thread --> http://xdaforums.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,574
1,064
Lyon
26479bf9c1e3d1a72b07f278f3445e88.jpg


it works for me ;)

For the decompile:

Go to this thread --> http://xdaforums.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,131
325
Amberg
Google Pixel 5
Google Pixel 6 Pro
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,574
1,064
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://xdaforums.com/showthread.php?t=2717736

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

Rom

Senior Member
Jul 1, 2013
2,574
1,064
Lyon
did u activate it in the Tweakbox?


the apk is completely correct... i have the reflection navbar as u can see on the pic ;)
Yes i have enable it and my navbar icons are changed but i not see exactly the same buttons, see attachments :)
 

Attachments

  • Screenshot_2015-09-24-21-00-19.png
    Screenshot_2015-09-24-21-00-19.png
    133.9 KB · Views: 1,222
  • Capture.JPG
    Capture.JPG
    59.5 KB · Views: 1,208

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    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.
    5
    Could you share that with a fellow Münchner?


    of course, hope you like it :)
    5
    @flooi
    Since you have no difficulty in changing themes, you can change the theme Reflection Soft key is please? :)
    http://xdaforums.com/showthread.php?t=2717736

    hey, in your theme two icons where missing (qslide and dual) so i hope u will not use them :)
    3
    26479bf9c1e3d1a72b07f278f3445e88.jpg


    it works for me ;)

    For the decompile:

    Go to this thread --> http://xdaforums.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
    3
    Many thanks, man.

    Gesendet von meinem LG-H815 mit Tapatalk

    tell me if u like it... if not, i can modify it tomorrow...


    Grüße nach Lüdenscheid ;)