[TUT] TwitterMod Theming Tutorial - Android Themes

Hello all, as I am not always available to update this app, I have decided to release a DIY tut so you guys can mod it yourself
Also from this, I hope it will give you guys some idea how to apply these mods to other apps
We shall begin
============
What is needed:
1. APK Tool or APK MultiTool or anything which you can decompile, compile and sign the apk
( Personally I use APK MultiTool and I am going to use that as an example throughout the whole TUT )
2. Java installed on your com to run APK MultiTool
3. Notepad+ or any similar code editing programs
4. Time and patience
Procedure:
1. Firstly, you are going to have to download Twitter apk of course
You can get the APK from PlayStore or apkmirror.com
2. Decompile it using APK MultiTool. Please refer to guides on how to do so if you dont know how
3. Now everything will be decompiled into a folder.
4. First thing we will mod AndroidManifest.xml
#RemovingPermissions
5. Delete the lines of permissions you dont want, eg
Code:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
6. Save the file
#Changing launcher icon
7. Now we will be changing the launcher icon of Twitter
- Usually you can find out what is the file of the icon by looking into the AndroidManifest.xml
Code:
android:icon="@drawable/[COLOR="MediumTurquoise"]ic_launcher_twitter[/COLOR]"
8. So for Twitter, we will be going to the drawables folder in res and find for ic_launcher_twitter
- Drawables folder can be drawable-ldpi/mdpi/hdpi/xhdpi/xxhdpi and so on
- ldpi, mdpi, hdpi, xhdpi, tvdpi are all screen "size". U will notice the icons in ldpi are smaller while the icons in xhdpi are bigger
- From here you also can theme other icon according to your preference
9. I have uploaded an attachment which consist of TwitterMod Teal launcher icon.
#Changing statusbar color ( For Lollipop )
10. We will create a values-v21 folder in res
- We create this folder so that only Lollipop roms will read this. Learn more here
- If values-v21 folder already exist, skip to next section
11. From the values folder, copy styles.xml to values-v21 folder
12. Now open up styles.xml in values-v21 and search for the base theme ( Hit ctrl+f on your keyboard )
- The base theme for that app usually can be found at AndroidManifest.xml also at
Code:
android:theme="@style/Theme"
- For some apps there is an exeption and may not always work with this base theme
- So improvise yourself and find the second nearest theme in styles.xml
- For Twitter, the base theme somehow is ThemeBase
13. So in styles.xml of Twitter, the base theme should look like this :
Code:
<style name="[COLOR="YellowGreen"]ThemeBase[/COLOR]" parent="@android:style/[COLOR="Red"]Theme.Material.Light[/COLOR]">
- The words in red may vary from different apps
- Please note that Theme.Material.Light is only applicable to v21 folders
- If you see Theme.Holo or something like that in v21 folder, feel free to change it too Theme.Material.Light
- Learn more here
14. Now at that base theme section, add this code
- This will be the color of your status bar, navigation bar and recent app panel app color
- Change the RED code to any color you want. I have some reference for you down there
Code:
<item name="android:statusBarColor">#[COLOR="red"]ffffffff[/COLOR]</item>
<item name="android:navigationBarColor">#[COLOR="red"]ff000000[/COLOR]</item>
<item name="android:colorPrimary">#ff123456</item>
[U]Color Code[/U]
Black - FF000000
White - FFFFFFFF
Teal - FF009688
[URL="https://www.google.com/design/spec/style/color.html#color-color-palette"]More colors[/URL]
15. Save the file
#Make the app fun ( You can skip this if you want )
16. Now open up strings.xml in values folder
17. Change what you want accordingly with some common sense
18. Now we will add some credits to yourself and maybe me?? :cyclops:
19. Goto xml folder and open up preference.xml
20. Add this line here
Code:
<PreferenceScreen android:title="@string/[COLOR="SeaGreen"]twittermod_title[/COLOR]" android:key="about" android:summary="@string/[COLOR="RoyalBlue"]twittermod[/COLOR]" android:order="1004" />
</PreferenceScreen>
21. Open strings.xml and add this code anywhere
Code:
<string name="[COLOR="SeaGreen"]twittermod_title[/COLOR]">[COLOR="Red"]BLABLA[/COLOR]</string>
<string name="[COLOR="RoyalBlue"]twittermod[/COLOR]">[COLOR="red"]BLABLA[/COLOR] </string>
22. Save it
#Finally
23. Now everything is done, compile and sign the app using APKMultiTool or whatever
24. If their is an error compilling, check what it is and post here for help
- I will do my best to reply in a short time
25. Install it and feel proud of yourself.
26. Fail and errors will exist and always, you can come here for help
I might have missed out something so it would be great if someone point it out
Next ( probably ) there will be a tut for KitKat translucent statusbar and for Facebook and Instagram
Thanks to :
Twitter for their apk
Google for their codes

reserved 1

mine also

thank you very much

Related

[Q] How to make status bar semi-transparent?

Thanks to anyone can help me
a121232 said:
Thanks to anyone can help me
Click to expand...
Click to collapse
decompiler SystemUI.apk
go to : projects\SystemUI.apk\res\layout
open status_bar_tracking.xml
in line like this: <View android:background
you can change colore. two first code(ff) for alpha color change to ex aa
or better way
a 9.png file named status_bar_background in drawable-ldpi.
remove .9 from name. edit this file in image editor (ex photoshop) then make a .9.png file with draw.patcher or make a normal png file in 240X320 resolation named status_bar_background.png (delet status_bar_background.9.png)
okey go to status_bar_tracking.xml change:
Code:
<View android:background=#[COLOR="Red"]xxxxxxxx[/COLOR]
to:
Code:
<View android:background="[COLOR="SeaGreen"]@drawable/status_bar_background[/COLOR]"
compiler again apk.
** don't forgot to delet edited file from keep folder and resources.arsc if you use apk manager!!!

[Tutorial][NICS Themer] Create Your Own Themed apk & Become a Themer - 06.10.13

Now Featured in XDA Portal. Thanks for the support
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
http://www.xda-developers.com/android/comprehensive-xthemeengine-theme-creation-guide/​
***This Themer guide should work in any device running android 4.0.4 & +
About NICS Themer
NICS Themer works with Xposed App & X-Themer Engine. It is intended to serve the same purpose as T-Mobile/CM10 Theme Engine. NICS lets you to create own themed apk, my friend neroyoung first develop the idea of it & implemented in his NICS Rom. I am writing a complete guide here to share with you cause I think it's a really useful thing
Requirement
1. X-posed App by rovo89
2. X-Themer Engine by ruqqq
3. My Base.apk
4. Virtuous Ten Studio (VTS) - Official Website
5. A Editing Software like Paint.NET - Download Link
Note: # 1,2,3 are available in 2nd post attachment
Note: for more information about X-posed App & X-Themer Engine visit the official thread.
Main Guide
1. Download & install VTS in default directory & place Base.apk in Desktop
2. Open VTS & click on File>New Project (Right hand top corner). Click on Import tab & locate the Base.apk from Desktop, then click Import. Now click on Project tab & you will see the Project name as "Base", give a Solution name or just name it to "Base" as well. Then press Ok. For better understanding I am providing screenshot with serial number to the task you have to do.
3. You will see now task is running & in some seconds your apk will be decompile successfully. It will look like this, minimize VTS
4. Now go to there where VTS keeps projects. For me it is in C:\Documents and Settings\USER\My Documents\Virtuous Ten Studio\Projects
Now go inside your project "Base\Data folder.
Inside drawable folder there is a png which is the icon of the apk
Inside xml folder there is a redirection.xml, we have to redirect the packages which we will theme & other xmls need to be write here.
Go inside values folder & delete Public.xml
5. Now lets begin with the guide. As framework, systemUI & Settings are the three most important component of Rom, I will show how to theme & redirect them.
6. Now, 1st decompile Settings.apk which you want to theme to get the resources & pngs from there. Use another tool like Apktool, Xda Auto Apktool or Apk Multitool. Here is a Guide on Apk Multi Tool.
7. Open AndroidManifest.xml of Settings.apk, we need android version & package name of it. Like for my Settings.apk it is
android:versioncode="15"
pacakge="com.android.settings" Remember those or note it down somewhere
Also go to the drawable-hdpi folder of Settings.apk & copy the pngs you want to theme. Note that, according to your phone this drawable folder can be drawable-ldpi/mdpi/hdpi/xhdpi. So according to it make a drawable folder in Data\Res of the decompiled Base.apk
I am creating it in Data\res\drawable-hdpi, & adding the pngs in the folder which I have copied from Settings.apk
8. Now, inside the drawable-hdpi folder rename the pngs with anything you like. To avoid all conflicts I would suggest to add the package name infront of every png. For example, I have taken three pngs from settings. Here are the original & renamed name of them--
ic_settings_wireless.png -------------- com_android_settings_ic_settings_wireless.png
ic_settings_bluetooth2.png ---------- com_android_settings_ic_settings_bluetooth2.png
ic_settings_data.png ------------------- com_android_settings_ic_settings_data.png
9. Now go to xml folder & write a new xml named "com_android_settings.xml" & write according to how many pngs you have taken,
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/ic_settings_bluetooth2">@drawable/com_android_settings_ic_settings_bluetooth2</item>
<item name="drawable/ic_settings_data_usage">@drawable/com_android_settings_ic_settings_data_usage</item>
<item name="drawable/ic_settings_wireless">@drawable/com_android_settings_ic_settings_wireless</item>
</resource-redirections>
Save it.
Here, item name="drawable/ic_settings_bluetooth2" - is the original png name which is inside Settings.apk
@drawable/com_android_settings_ic_settings_bluetooth2 - is the renamed pngs which will replace the original png
So it will look like this,
10. Now decompile SystemUI.apk the same way & get android version & package name from AndroidManifest.xml. For me it is,
android:versioncode="15"
package="com.android.systemui"
Copy the pngs you want to edit from drawable folder & add it to Data\res\drawable-hdpi folder of Base.apk. Now rename the pngs you have copied with the package name attached to the front. Like for a png the original & renamed is-
stat_bluetooth_on.png ---------- com_android_systemui_stat_bluetooth_on.png
11. Write a new xml in xml folder named "com_android_systemui.xml" & write according to how many pngs you have taken-
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/stat_2g3g_off">@drawable/com_android_systemui_stat_2g3g_off</item>
<item name="drawable/stat_2g3g_on">@drawable/com_android_systemui_stat_2g3g_on</item>
<item name="drawable/stat_3g_on">@drawable/com_android_systemui_stat_3g_on</item>
<item name="drawable/stat_airplane_on">@drawable/com_android_systemui_stat_airplane_on</item>
<item name="drawable/stat_bluetooth_on">@drawable/com_android_systemui_stat_bluetooth_on</item>
<item name="drawable/stat_brightness_auto">@drawable/com_android_systemui_stat_brightness_auto</item>
<item name="drawable/stat_brightness_mid">@drawable/com_android_systemui_stat_brightness_mid</item>
<item name="drawable/stat_brightness_on">@drawable/com_android_systemui_stat_brightness_on</item>
<item name="drawable/stat_data_on">@drawable/com_android_systemui_stat_data_on</item>
<item name="drawable/stat_flashlight_on">@drawable/com_android_systemui_stat_flashlight_on</item>
<item name="drawable/stat_gps_on">@drawable/com_android_systemui_stat_gps_on</item>
<item name="drawable/stat_lock_screen_on">@drawable/com_android_systemui_stat_lock_screen_on</item>
<item name="drawable/stat_orientation_on">@drawable/com_android_systemui_stat_orientation_on</item>
<item name="drawable/stat_reboot">@drawable/com_android_systemui_stat_reboot</item>
<item name="drawable/stat_ring_on">@drawable/com_android_systemui_stat_ring_on</item>
<item name="drawable/stat_screen_timeout_1m">@drawable/com_android_systemui_stat_screen_timeout_1m</item>
<item name="drawable/stat_screen_timeout_2m">@drawable/com_android_systemui_stat_screen_timeout_2m</item>
<item name="drawable/stat_screen_timeout_10m">@drawable/com_android_systemui_stat_screen_timeout_10m</item>
<item name="drawable/stat_screen_timeout_30m">@drawable/com_android_systemui_stat_screen_timeout_30m</item>
<item name="drawable/stat_screen_timeout_15s">@drawable/com_android_systemui_stat_screen_timeout_15s</item>
<item name="drawable/stat_screen_timeout_30s">@drawable/com_android_systemui_stat_screen_timeout_30s</item>
<item name="drawable/stat_shutdown">@drawable/com_android_systemui_stat_shutdown</item>
<item name="drawable/stat_sync_on">@drawable/com_android_systemui_stat_sync_on</item>
<item name="drawable/stat_wifi_on">@drawable/com_android_systemui_stat_wifi_on</item>
</resource-redirections>
Save it.
12. Now decompile framework-res.apk get the package name & android version from AndroidManifest.xml & get the pngs from drawable folder & add them in Data\res\drawable-hdpi folder of Base.apk. My framework's package & version is -
android:versioncode="15"
package="android"
Now rename the framework-res pngs with package name "android" or like I have done. The original & renamed png name is like this for me-
switch_bg_on_disabled_holo_dark.png ------------ framework_res_switch_bg_on_disabled_holo_dark.png
Now open a new xml in xml folder named "android.xml" & write according to how many pngs you have taken to modify
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/switch_bg_on_disabled_holo_dark">@drawable/framework_res_switch_bg_on_disabled_holo_dark</item>
<item name="drawable/switch_bg_on_disabled_holo_light">@drawable/framework_res_switch_bg_on_disabled_holo_light</item>
<item name="drawable/switch_bg_on_holo_dark">@drawable/framework_res_switch_bg_on_holo_dark</item>
<item name="drawable/switch_bg_on_holo_light">@drawable/framework_res_switch_bg_on_holo_light</item>
<item name="drawable/switch_thumb_disabled_focused_holo">@drawable/framework_res_switch_thumb_disabled_focused_holo</item>
<item name="drawable/switch_thumb_focused_holo">@drawable/framework_res_switch_thumb_focused_holo</item>
</resource-redirections>
Save it.
Note that for .9 pngs we won't add .9 to the xml
13. Open redirections.xml in xml folder & we have to write all the package redirections here. In my case I have three packages to redirect.
for Settings --
Code:
<package-redirections android:name="com.android.settings" android:resource="@xml/com_android_settings" android:minSdkVersion="15" />
for SystemUI --
Code:
<package-redirections android:name="com.android.systemui" android:resource="@xml/com_android_systemui" android:minSdkVersion="15" />
for framework --
Code:
<package-redirections android:name="android" android:resource="@xml/android" android:minSdkVersion="15" />
Here android:name is the main package which will be themed
android:resources is the xml from where png's will be redirected & replaced
android:minSdkVersion is the android:versioncode which we got from the main packages
So, the complete redirections.xml is may case will be -
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme-redirections
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
<package-redirections android:name="com.android.settings" android:resource="@xml/com_android_settings" android:minSdkVersion="15" />
<package-redirections android:name="com.android.systemui" android:resource="@xml/com_android_systemui" android:minSdkVersion="15" />
<package-redirections android:name="android" android:resource="@xml/android" android:minSdkVersion="15" />
</theme-redirections>
Save it. Note that, you need to close redirections with </theme-redirections> to the end.
Also, Remove "/" from the 3rd end of the line. So the 3rd line will be,
Code:
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
14. Now go to drawable-hdpi folder where all the renamed pngs are. Open them with Paint.NET & change hue/saturation to the color you want to theme them. crtl+shift+U gives you the option in Paint.NET. When theming is done save all pngs. My drawable-hdpi folder looks like this-
15. Now check once again in Data\res folder.
In drawable folder there should be icon.png which will be the icon for your apk
In values folder there will be nothing as we have deleted public.xml earlier
In xml folder there should be redirections.xml with other xmls you have created
In drawable hdpi folder there will be all the renamed & themed pngs
16. Now maximize VTS window & open AndroidManifest.xml of the Base.apk. In android:label write something you want it to be shown as the apk name. In package name give name according to your color theme. Like for me it is "saqib.themer.green". If you make another one which is orange in color name it to "saqib.themer.orange" so that it doesn't replace the earlier apk when installing. After this, save the xml. For better understanding, I have marked screenshot with serial number-
When you are done press "Build all", it will run a process & create your new apk. CONGRATULATIONS :good: now you have successfully built your own themed apk. Get it from Data\Binary folder of VTS Project.
Attachments
* Download Xposed App & X-Themer Engine from attachment & install them as a normal apk in your device.
* Go to Xposed Installer App click on Install/Update, then go to Modules & tick mark on XTheme Engine. Reboot your device
* Install the newly created apk by yourself as a normal apk. You will find it inside XThemeEngine App. Apply it, it will ask for a soft reboot. After reboot you will see the changes that the app has made.
Here, I am sharing a screenshot after applying my Green themed apk via XTheme Engine
For automated batch file renaming & redirections go to this post by Madaditya - Link to Post
Credits
** neroyoung
** rovo89
** ruqqq
** Diamondback
For any more support, I am also attaching the Green_Hulk.apk I have made in the process. If you need to know more or have any confusion download that & decompile it. Your idea & conception will get more clear.
Nice Guide Mate...
Its really helpful for beginner
Nice work saqib,
Nicely written well mannered guide! Detailed enough to make even a beginner themer as pro
Awesome!!
nicely written bro... definitely a beginner would understand it with ease :good:
Awesome guide, bro...
Just a doubt... is it necessary to use vts? Can't I simply use apktool for decompiling the base apk? Im on linux and I dont think vts is for linux..
AJ
Amazing stuff there..Mate..
Keep it up ..Will link in my threads so as more people notice it..
Great guide mate! Keep it up! I'm sure even beginners are able to follow the steps
Abhinav2 said:
Awesome guide, bro...
Just a doubt... is it necessary to use vts? Can't I simply use apktool for decompiling the base apk? Im on linux and I dont think vts is for linux..
AJ
Click to expand...
Click to collapse
Thanks..Yes you can use other apk tools too for Base.apk. I have suggested VTS because with VTS when you change AndroidManifest you don't need to sign them or compile with old signature etc..If you use apktool then don't forget to re-sign the base apk
help
Hi saqib!
For first thank you for the gide!! It was really helpfull for me! But I got an error while I try to build my apk. I dont't know what is the problem, 'cause I did everything as you said (but change my android version to 16). The log says that I have some junk after document element, and I don't know what to do. Any suggestion?
question do you need to set resource file. like say Samsung framework resource would be 1.apk and so on. And if you do. what resource file do we need. from are rom or will it use java and android sdk for the resource files. thanks for this
dywerd said:
Hi saqib!
For first thank you for the gide!! It was really helpfull for me! But I got an error while I try to build my apk. I dont't know what is the problem, 'cause I did everything as you said (but change my android version to 16). The log says that I have some junk after document element, and I don't know what to do. Any suggestion?
Click to expand...
Click to collapse
Check redirections.xml line number 4, there is some problem in that line. If you cannot find it show it to me
monkeytools said:
question do you need to set resource file. like say Samsung framework resource would be 1.apk and so on. And if you do. what resource file do we need. from are rom or will it use java and android sdk for the resource files. thanks for this
Click to expand...
Click to collapse
When you setup VTS it will place some default frameworks which are needed for resources. So you don't need to install frameworks separately for this guide
Congrats for making it on the portal!
You're becoming something like a guru here hehe
Keep it up!
Hi saquib!
Thanks for the reply! I check those line a hundred times, even rewrite it, but no luck
Here's a creenshot, I hope you can figure it out :angel:
dywerd said:
Hi saquib!
Thanks for the reply! I check those line a hundred times, even rewrite it, but no luck
Here's a creenshot, I hope you can figure it out :angel:
Click to expand...
Click to collapse
You don't have any com_android_settings.xml in xml folder, that's why it is giving trouble. You also don't have android.xml from where the resources will be replaced. Go back to my guide & take a look again, you missed those parts
I don't know why they are not showing in vts, but now they are there (com_android_settings & so on), but android.xml not, and now I see that I have to create that, right? Can you tell me how to that? I check your gide, but can't find that... sorry
dywerd said:
I don't know why they are not showing in vts, but now they are there (com_android_settings & so on), but android.xml not, and now I see that I have to create that, right? Can you tell me how to that? I check your gide, but can't find that... sorry
Click to expand...
Click to collapse
rename com_android_framework.xml to android.xml, you have redirected to android.xml but named one xml as com_android_framework
you should download my Green_Hulk.apk which I attached to the 2nd post, it is a complete apk, you should get your concept clear from that apk
saqib nazm said:
rename com_android_framework.xml to android.xml, you have redirected to android.xml but named one xml as com_android_framework
you should download my Green_Hulk.apk which I attached to the 2nd post, it is a complete apk, you should get your concept clear from that apk
Click to expand...
Click to collapse
Thanks for your help! I really appreciate it!
I think I too noob for that, I do what you said or at least I think I do, but no succes :crying:
I upload my "creation"; if you so kind, will you see that and maybe you can help again for me... :angel::fingers-crossed:
Sorry for disturbing you
ImageRx
@saqib nazm
Thank You for Such an Awesome Guide!
I've just made a script ImageRx that would​
1.Add the required prefix to image name and Rename them
2.Also create the required redirection xml​
So this Would Automate renaming multiple images with same prefix as needed for NICS themer
Download ImageRx_Madaditya
Also Find my Updated tool Here ToolsX
Credits
[email protected] Used his Goptimizer Mini Cygwin Pack as Base for Bash script to Run on windows!
2 @saqib nazm-For this Awesome guide
Click to expand...
Click to collapse
Hope this will be helpful :good:
Since this is my first script might have errors.Please report​
dywerd said:
Thanks for your help! I really appreciate it!
I think I too noob for that, I do what you said or at least I think I do, but no succes :crying:
I upload my "creation"; if you so kind, will you see that and maybe you can help again for me... :angel::fingers-crossed:
Sorry for disturbing you
Click to expand...
Click to collapse
Ohk I will take a look at night, or if not then tomorrow
Madaditya said:
@saqib nazm
Thank You for Such an Awesome Guide!
I've just made a script that would​1.Add the required prefix to image name and Rename them
2.Also create the required redirection xml​So this Would Automate renaming multiple images with same prefix as needed for NICS themer
Download ImageRx_Madaditya
Hope this will be helpful :good:
Since this is my first script might have errors.Please report​
Click to expand...
Click to collapse
Really thanks for this man :good: you just made things alot easier now I will link this thread to my 2nd post

[GUIDE] Theming SystemUI(StatusBar (Adding custom background and adding analog clock)

Hello guys!! Im new here!
My tutorial helps you modifying status bar (sytemui)
-Expanding status bar
-Adding background image
-Adding analog clock
Tools needed:
Apktool (I recommend apktool 4.4)
Root Explorer
920 Text Editor
_______________________________________________
Let's start
1st
Open Root Explorer
Go to /system/framework/ and copy framework-res.apk to folder /mnt/sdcard0/apktool/a/
2nd
Open apktool
Go to /mnt/sdcard0/apktool/a/ and click framework then "decompile resources" wait until it finishes.
3rd
Open Root Explorer
Go to your decompiled framework and open
"Framework-res_src/values" and open "dimens.xml"
4th
Find status_bar_height and change 25.0dip to 50.dip
5th
Recompile, sign, push!!
Your status bar was expanded!!:laugh::laugh:
___________________________________________________
Adding custom background image on your status
Same tools.
1st
Just copy your systemUi.apk from system/app
And paste to same place where you paste your framework.
2nd
Go to SystemUI_src/res/layout/ and open (gemini_status_bar.xml on mediatek devices) (status_bar.xml on other devices) (tw_status_bar.xml or tw_status_bar_dual.xml on samsung devices)
Copy this code and paste in line 5:
<RelativeLayout androidrientation="horizontal" android:id="@id/statbg" android:background="@drawable/stat_bg" android:layout_width="fill_parent" android:layout_height="50.0dip" />
Go to res/values/ids.xml and paste this code anywhere.
<item type="id" name="statbg">false</item>
And paste your desired background on drawable-hdpidrawable-hdpi and name it with "stat_bg.png"
3rd
Recompile, sign, push!! Your status_bar has now custom background image.
Adding analog clock is on next tutorial...
well
lxhlzyh said:
well
Click to expand...
Click to collapse
Hi.Have you tried this guide?
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
zhaozihanzzh said:
Hi.Have you tried this guide?
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
Click to expand...
Click to collapse
no

[GUIDE][THEMING]How to theme any Android App

I make (another) guide on how to theme, but it’s based on my experience. If moderators think this thread redundant , they are free to delete or close it.
This tutorial is for « every » operating system. In this tutorial I will change the color of some object of the XDA Labs app . There will be 2 part for this guide, the first is the general method and the second one is the description of what I’ve done on the XDA Labs app to theme it. Please , before asking , read the entire OP , maybe your answer is into it.
I’m running Ubuntu 16.04 LTS but the softwares are also compatible with windows and mac.
Which software I use :
• Inkscape (to make icons)
• Alpha Colour for Android (to see which aplha code correspond to which level of opacity)
• Pipette for Android (to identify colors on the app’s screenshot) No longer available , use this app, it's even more accurate
• ZipSigner for Android(to sign apk)
No longer available, for signing please refer to this tool
I-General Method :
1-First you need to set-up your PC’s environment:
• A 64-bit PC Processor ( 32-bit has too many bugs linked to aapt compatibility)
• Apktool or other reverse engineering tools properly installed
• Java 7 or above
• Notepad++ or any text editor
2-What you should know before theming:
A)Colors:
Modifying colors is quite simple a process, but you should first understand it.Then you can change the app as your mind tells you to.
1-A regular line in this file is built like this :
-<color name="[object’s id]">#[alpha channel][hex code]</color>
2-Meaning :
- Alpha channel : This is the 2 characters that change the opacity of the color
- Hex Code : This is the 6 characters that define the color itself
3-For example :
<color name="design_fab_stroke_end_outer_color">#0f000000</color>
- «design_fab_stroke_end_outer_color» is the id of the object I want to change the color from
- «0f» is the alpha channel of the initial color
- «000000» is the hex code of the initial color
4-To modify them :
Replace the hex code of the initial colors by the hex code of the color you want to add , be careful not to delete a piece of the line with the old hex code because it will cause errors on apktool. I use alpha colour app for Android to see levels of opacity and to find color’s hex code.
B)Pictures :
You want to change pictures inside the app , that’s simple :
• Search for the picture you want to change in the drawable folder or mipmap folder
• Folders you want to browse to find the pictures :drawable-xhdpi-v4 / xxhdpi-v4 / xxxhdpi-v4 for the « in-app » pictures , every mipmap folders for icons (sometimes icons are in drawable folders and there aren’t any mipmap folders).
• When you prepare the pictures , make sure they have the SAME SIZE as the original pictures.
• Rename the picture you have prepared to replace old ones with the SAME NAME AS THE OLDER PICTURES.
• Once you have renamed those pictures, put them into the folder where you found them.
C) App name :
• go to /res/values and open string.xml
• Modify this string : <string name="app_name">[The name you want]</string>
Example :<string name="app_name">XDA Evolved</string>
3-Now , we can start theming :
• Go to the apktool’s directory , and open a command prompt there (keep it open till the end)
• Enter this command :
Code:
java -jar apktool.jar d [the apk name.apk]
• There should be a new folder which has the name of your apk file. Open this folder.
• Then go to /res/values and open the colors.xml file
• Modify the colors
• Search for the pictures you want to change and change them as I have written above
• Open the terminal you kept open
• Enter this command :
Code:
java -jar apktool.jar b [the apk name.apk]
4-Before installing , signing :
I use an Android app called zip signer , with which I can sign apks from my phone.
• Open the app , click on input and browse for the apk you’ve put on your phone
• Click on the file when you’ve found it
• Click on Output and select the same apk file as in the first step
• Rename the path adding a « -signed » just before « .apk » at the end of the path.
• Select on the « key/mode » menu « platform »
• Finally , click on « sign the file » and wait till the end of the progress bar.
II-What I’ve done
1-Identifying :
Here is the list of the infos I’ve written down :
• Image Size
• The Hex code of the color I want to change :
- Take a screenshot of the color(s) you want to modify
- Open the screenshot on Pipette
- Tap on the lock button and click on the color , the hex code will be displayed at the bottom
• The Hex code of the color I want to add : Same process with Pipette
• The colors I want to add :
-Blue :3174f1
-Yellow :fbb002
-Background :47595c
-Background of the posts :2d2d2d
-the secondary color :c0c0c0
Click to expand...
Click to collapse
• The colors I want to change:
-Background color :212121
-Accent color :edb02d
-Primary color :353535
-The secondary color :#aaffffff
Click to expand...
Click to collapse
2-Editing and making new icon, etc.:
• I used Inkscape (free alternative to illustrator) because there were vector-designed icons.
• I used gimp to resize the picture after making them.
3-Decompiling the apk file :
• I typed in the terminal :
Code:
java -jar apktool.jar d XDALabs.apk
4-Replacing icons and other images :
• I put the pictures in the 3 drawable folders because it’s where I found them
5-Editing colors and the name :
• I went to /res/values and I opened colors.xml file and I replaced colors and some alpha channel :
Code:
<color name="accent">#ffedb02d</color>
<color name="accent_translucent">#ddedb02d</color>
<color name="background_dark">#ff212121</color>
<color name="dialog_bg_dark">#ff212121</color>
<color name="primary">#ff353535</color>
<color name="primary_bg">#ff353535</color>
<color name="primary_dark">#ff2b2b2b</color>
<color name="search_divider_dark">#ff212121</color>
<color name="search_list_results_bg_dark">#ff212121</color>
<color name="secondary_text">#ff727272</color>
to
Code:
<color name="accent">#fffbb002</color>
<color name="accent_translucent">#ddfbb002</color>
<color name="background_dark">#ff47595c</color>
<color name="dialog_bg_dark">#ff2d2d2d</color>
<color name="primary">#ff3174f1</color>
<color name="primary_bg">#ff2d2d2d</color>
<color name="primary_dark">#ff3174f1</color>
<color name="search_divider_dark">#ff2d2d2d</color>
<color name="search_list_results_bg_dark">#ff2d2d2d</color>
<color name="secondary_text">#ffc0c0c0</color>
• I opened strings.xml file and I replaced the app name line :
Code:
<string name="app_name">XDA Labs</string>
to
Code:
<string name="app_name">XDA Evolved</string>
6-Recompiling the new apk file :
• I opened the same command prompt and I typed this command :
Code:
java -jar apktool.jar b XDALabs
7-Signing the apk after install it :
• The same process as in the step 4 in the part one of my guide (I - 4).
8-Install the Apk :
• Uninstall the original app
• Install the signed version of the apk.
You can ask me on this thread about everything about the theming and I'll do my best to solve your problems, but do it in the respect and following the Forum Rules
You can go to themed XDA Labs version's thread clicking here.
And please , if you found this guide useful , press the thank button.
When I learn
Thank you for posting this. I always wanted to customize an android app, but have never had much success.
coluvatz12 said:
Thank you for posting this. I always wanted to customize an android app, but have never had much success.
Click to expand...
Click to collapse
Glad to hear that , thanks!
If you think this thread helped you , please press the thank button , I'm happy to see that my work is appreciated , Happy Theming !
nandakumar12 via PM said:
dude one doubt, how can i change the background color of an app, i cant find a code to change..??
Click to expand...
Click to collapse
First you should have installed the app and identified the hex code of the background color (E.G :#36ge87)
You can do it via Pipette , an app which identify hex code in a picture. Just take a screenshot and identify the colors via Pipette .
Then you will have to search for the hex code of the background color you identified with Pipette previously.
This step is on your PC , you opened the color.xml file in notepad++ or whatever it is , and you wrote the hex code of the background color in the search bar. Make the search and find all the lines that have the hex code in it.
If you found multiple line , try to modify one of the lines , compile the APK , sign it and install it on your phone to see if something changed. Do that until you find the line holding the background color.
Theming , at the beginning is pretty long on require patience and many test before finding which line is the good one .
I hope my answer will help you .
Happy theming !!???
DUVIDA
Hello friends of the forum xda developers Instead, this forum is a newbie Needed to take a doubts:
I have a mobile model with windows 10 installed that is stopped in the drawer without use
He has put windows phone 10
I would like to change it on an Iphone with COMPATIVEL System OR ate pie android EVEN Instalar 9,0
I wonder if this is possible and what procedures to take I assume of all the risks ok
Other question:
I have a moto g5 plus and the Manufacturer Promised me an Update for the oreo 8.1.0 but until the moment nothing arrived and the artist said that it has already been released but up to the moment without conditions of receipt
There is a rumor that will be released only in September
Someone confirms this information
I await any response
Marcelo - DJ KUKA
djkukapr said:
Hello friends of the forum xda developers Instead, this forum is a newbie Needed to take a doubts:
I have a mobile model with windows 10 installed that is stopped in the drawer without use
He has put windows phone 10
I would like to change it on an Iphone with COMPATIVEL System OR ate pie android EVEN Instalar 9,0
I wonder if this is possible and what procedures to take I assume of all the risks ok
Other question:
I have a moto g5 plus and the Manufacturer Promised me an Update for the oreo 8.1.0 but until the moment nothing arrived and the artist said that it has already been released but up to the moment without conditions of receipt
There is a rumor that will be released only in September
Someone confirms this information
I await any response
Marcelo - DJ KUKA
Click to expand...
Click to collapse
Don't know what you want to ask
Please be clear
All I can infer is that this doubt doesn't belong here look over the ROMs sections
Thanks!
GAURAV THAKKAR said:
Don't know what you want to ask
Please be clear
All I can infer is that this doubt doesn't belong here look over the ROMs sections
Thanks!
Click to expand...
Click to collapse
Don't worry , that's a random spam , that's why I ignored it.
And I don't think he'll respond .
RaiZProduction said:
Don't worry , that's a random spam , that's why I ignored it.
And I don't think he'll respond .
Click to expand...
Click to collapse
Since you've replied please check the Signing Apk Guide..
You've mentioned a thread dated 4 sep
Can you please link me to it?
GAURAV THAKKAR said:
Since you've replied please check the Signing Apk Guide..
You've mentioned a thread dated 4 sep
Can you please link me to it?
Click to expand...
Click to collapse
Fixed !
That was just a typo , what I really meant is the step four in the first part of the Guide , the I - 4 .
RaiZProduction said:
Fixed !
That was just a typo , what I really meant is the step four in the first part of the Guide , the I - 4 .
Click to expand...
Click to collapse
Trying to theme Instagram
Will ping you if any issue occurs
Thanks for the simplest and to the point guide I've seen ever
GAURAV THAKKAR said:
Trying to theme Instagram
Will ping you if any issue occurs
Thanks for the simplest and to the point guide I've seen ever
Click to expand...
Click to collapse
You're welcome , all the pleasure is for me :highfive:
Does this work similar for changing a boot logo?
hello. i got this after compiling. is this normal ?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
thanks !
Tarwada said:
hello. i got this after compiling. is this normal ?
thanks !
Click to expand...
Click to collapse
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
Code:
java -jar apktool.jar if framework-res.apk
RaiZProduction said:
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
Code:
java -jar apktool.jar if framework-res.apk
Click to expand...
Click to collapse
sorry i don't get it. im not connecting my phone to the computer
im trying to theme an app called mewe :\
Tarwada said:
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
sorry i don't get it. im not connecting my phone to the computer
im trying to theme an app called mewe :\
Click to expand...
Click to collapse
Hey buddy to theme some apps you need the framework apk also because it's some how dependent on framework as far as I know
GAURAV THAKKAR said:
Hey buddy to theme some apps you need the framework apk also because it's some how dependent on framework as far as I know
Click to expand...
Click to collapse
what about the message i got above
Tarwada said:
what about the message i got above
Click to expand...
Click to collapse
The message above means that the file I asked you to gather from your system isn't in the Apktool folder.
Sometimes, some apps require a framework to theme them correctly , that's why I asked you to do that.
So if you have root you can copy it from the /system/framework folder and paste it into your download folder to transfer it to your PC.
If not I'll search for you some others solution ?.
i managed to do it using apk editor on my phone but there's one thing i can't theme it in the app
can you help me so i provide some pictures ?
no pressure at all
---------- Post added at 01:23 PM ---------- Previous post was at 12:53 PM ----------
RaiZProduction said:
The message above means that the file I asked you to gather from your system isn't in the Apktool folder.
Sometimes, some apps require a framework to theme them correctly , that's why I asked you to do that.
So if you have root you can copy it from the /system/framework folder and paste it into your download folder to transfer it to your PC.
If not I'll search for you some others solution .
Click to expand...
Click to collapse
i extracted the framework-res.apk from my phone (im rooted)
but when i compile i get the same error even if i didn't modify the app :\
help ?
Tarwada said:
i managed to do it using apk editor on my phone but there's one thing i can't theme it in the app
can you help me so i provide some pictures ?
no pressure at all
---------- Post added at 01:23 PM ---------- Previous post was at 12:53 PM ----------
i extracted the framework-res.apk from my phone (im rooted)
but when i compile i get the same error even if i didn't modify the app :\
help ?
Click to expand...
Click to collapse
Can you tell me precisely what you modified in your APK ?

[GUIDE][GB] Material Recent

Hello to everyone.
Material Recent for Gingerbread
Made by zhaozihanzzh(ME Failed Coder), Open source
Created 2018-07-24
Last updated 2018-08-10
Note: If your native language is Chinese, you can go to this thread.
Hello guys. I have been making this material recent for a while. The project is based on @tentenponce 's SwipeRecentApps and ZieIony's library MaterialRecents. And I used m0r0's code to fix some bugs. I am a noob, but after many days' work I finally managed to get the performance improved and be able to convert it into framework. I made a short video for this: https://mega.nz/#!JJUVyYpL!cHySc82VtXUZpKVJGdVSHq6bLzQ0VE6q4Do3AcXTXIo
Features:
- Show the latest 7 recent apps
- Click to launch the application, swipe the card to try ending a process and long press the card to open application settings
- Click the clear button to launch an activity which is used to end processes
To start with, you need:
- Decompile / Recompile experience
- A rooted Android 2.3 with a process management app (the same as SwipeRecentApps)
- To be able to run Apktool 1.5.2
Before doing this, make sure you have a backup and are able to unbrick your phone.
Attachments: https://mega.nz/#!FdlyGYyQ!qP6-BUWGeVhWMbnBaLO3A839hhyE69qGbiWKJREbYas
Steps:
1. Decompile framework-res.apk and unzip the res folder to your decompiled files. (If your phone is not MDPI, you can manually resize the clear icon and put it under the proper drawable-??dpi folder.)
2. Open res/values/ids.xml and add the following lines before :
Code:
<item type="id" name="materialrecents_recentContent">false</item>
<item type="id" name="materialrecents_recentTitle">false</item>
<item type="id" name="materialrecents_recentIcon">false</item>
<item type="id" name="mainlayout">false</item>
<item type="id" name="materialrecents_recentHeader">false</item>
<item type="id" name="taskman">false</item>
<item type="id" name="noapps">false</item>
<item type="id" name="recent_frame">false</item>
Note: if you have done tenten's SwipeRecentApps you will find some ids already exist and you shouldn't add them.
Then, open res/values/strings.xml and add the following line before :
Code:
<string name="kill_app">The process has already been tried to end.</string>
3.Recompile framework-res and decompile the generated apk file and open the decompiled res/values/public.xml.(You can sign the generated framework-res apk properly and then let the apk wait for a while) Search for the item name below and write down their names and values:
Left: type Right: name
"color" transparent (I think this ID is same in all android devices, so maybe we can ignore it)
"layout" recent_apps_dialog
"id" taskman
"id" noapps
"id" mainlayout
"string" no_recent_tasks
"id" recent_frame
"string" kill_app
"layout" material_recents_card
"id" materialrecents_recentTitle
"id" materialrecents_recentIcon
"id" materialrecents_recentHeader
"id" materialrecents_recentContent
4. You need to have NineOldAndroids in your framework jars. Maybe some other guides you have done already add these library smalis to your framework.jar or android.policy.jar, such as the "nineoldandroids" in Ripple Effects on Button or "tentwentyoldandroids" in SwipeRecentApps. Therefore, if you already have this library, then you don't need to add my smali/com/noas folder and you should use a uniform path and name.(For example, if your path is com/nineoldandroids, then you should replace all the "com/noas" in all the smali files in smali/com/android/ and smali/tk/ with "nineoldandroids". By the way, in order to prevent Apps from loading the system NineOldAndroids instead of loading it from their own dex, I suggest not using "com/nineoldandroids".) If your ROM doesn't have nineoldandroids, or you don't understand what I am saying, then decompile android.policy.jar and merge the smali/com/noas folder.
5.Decompile android.policy.jar (If you have decompiled this in the 4th step, you don't need to decompile it again) and backup all the smali files related to recentapps and delete them. Then merge smali/com/android folder and smali/tk folder to your smali. After that, open smali/com/android/internal/policy/impl/RecentApplicationsDialog.smali and replace all the id numbers (commented with "#") with your own numbers which you have written down before. Notice that you should remove the first "0" after "0x", for example, if your id is 0x01080388, you are supposed to add "0x1080388" to your smali file. Do the same operation to smali/tk/zielony/merecents/RecentsList.smali.
6. Open smali/com/android/internal/policy/impl/RecentApplicationsDialog$100000001.smal and replace "com.sec.android.app.controlpanel" with the package name of your task management app, and replace "com.sec.android.app.controlpanel.activity.JobManagerActivity" with the task management activity of your application.
7. Recompile android.policy.jar and sign correctly. Push the modified android.policy.jar and framework-res.apk into system.
Source code: https://github.com/MeCreationTeam/ME_MaterialRecent.
If you want to compile it from source and decompile it into system by yourself, make sure the code
Code:
window.setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
in onCreate method in RecentApplicationsDialog.java uncommented. I commented this line only for directly build apk and testing. And the class path in source code is different from my smali.
Note: If you face problem when using horizontal screen, try to change the value of paddingLeft and paddingRight in the RelativeLayout in res/layout-land/recent_apps_dialog.xml according to your screen.
In fact, I don't have much time, so I am sorry that if you have some questions, probably I cannot help you.
Credits:
- tenten
- ZieIony
- m0r0
And thanks to NineOldAndroids.
This project is born with the help of open source project, and hope this project can continue to help others.
Reserved.
Sent from my HUAWEI CHM-TL00H using XDA Labs
Hope this thread can help you.
Sent from my HUAWEI CHM-TL00H using XDA Labs
Good job
Do you still want to swipe to kill process? I managed to get swipe work in this recent dialog(I wrote the code myself so maybe some bugs). Check the updated OP to get the new feature.
Sent from my HUAWEI CHM-TL00H using XDA Labs
NB

Categories

Resources