[GUIDE][GB]How to place a custom icon on the title bar of a certain app
After some of @SpaceCaker 's modifications, we found out how to place a custom icon on the title bar of any app. You can use your app's iconfor reference. So, one of the synonyms that could be said for this guide is JellyBean Title Bar. The modification is very easythough, but the hard part is wether you find the right file which controls the title bar on a specified window. But, I can help you in this
After following the guide, if you didn't understand it properly, just give me the app and I will place the custom JB title bar on it as per your request.
- Basic XML knowledge
- APK Multi TOOL/Whichever decompiling tool
- Sources on attachments
There are 2 different methods to make this.
First method means that the custom windows are located on layouts folder.
Second method means that the windows are located on XML folder.
The first method is very good and is bugfree, but unfortunately it depends on the app. If wether he has the windows located
on layouts folder or XML folder The second method is not fully bugfree. If the app's windows are located on XML folder then the title bar is going to be scrolled with the chooserboxes too. The only way to fix it is to create a layout for the window.
Screenshots of both methods:
One of HelpCentre (1st method) example given below and the second of DSP manager (2nd method).
1. Decompile the app you want to place the custom title bar. I will take a custom built app "HelpCentre.apk"
2. Download the sources on the attachments and place the layout "title" on the layout folder
and the custom id on ids.xml file on values folder.
<item type="id" name="imageView1">false</item>
a) In the first method the windows are located on the layouts. So see the following :
Go to layouts folder and now find the layout which is resposnible for the first window
Let's use an example :
I have credits.xml file on the layout folder. Now on this window, i want to place a custom title bar.
To do this i should include the custom title on layout folder on the first lines.
To make this, paste this code after xmlns:android="http://schemas.android.com/apk/res/android">
I also, have FAQ.xml too. If i want edit this file too, there will be no title bar as on the end of the guide we will add
NoTitleBar theme on AndroidManifest.xml So, therefore i have to place the same value on it too.
Again, after the code xmlns:android="http://schemas.android.com/apk/res/android"> place this one :
What if you want to use a custom title for the another window?
Easy, we are going to create another exact file as title.xml just that we will rename it different, like titleFAQ.xml.
On this XML we will change the android:icon value. We can use whatever value for the icon. For example, "@drawable/ic_credits" Then, we will paste the png you want to place on the drawable-mdpi.
Now in the FAQ.xml file you want to place another icon title we should change the layout target so according to what I did so far on the file, this is the target i should place.
b) In the second method the windows are located on the XML folder. So follow below :
Go to XML folder and now find the XML which is responsible for the window.
So I will use the same example.
So let's say that the Credits.xml is on the XML folder. Now instead of including <include android:layout_width="fill_parent"......
you should include this code below xmlns:android="http://schemas.android.com/apk/res/android">
5. Recompile the apk 6. Sign it (Always sign if you edit AndroidManifest.xml)
Full credits goes to the most amazing themer I have ever seen, @SpaceCaker!
He made many works for Touchwiz Resurrection ROM and I have based the guide upon that modifications just that I have edited
the code and fully explained it.
Also, Touchwiz Resurrection Team members @Vishnu pv and @radichification for their support!
And then like I mentioned before put the png on drawable-mdpi
Currently on the zip source I have included a Touchwiz title background as that's what I have atm, but you can get another one ICS or JB themed. I will provide them later. As per now, only touchwiz title background is available.
Download ZIP on attachments.
Don't forget to put correct credits if you are going to include this into your ROM/MOD/Theme.
Which can be also changed as HomeDisabled as in non-launcher Activity like in ActionBar
Reserved for a simpler Guide
we do know about this one
but it didnt really always worked and also this way it makes it bit easier to layout the icon properly and bg
because there are a lot of people who try this but fail with photoshoping the icon in background.
i also said that teddy shouldnt include the third method because that would be * to complex* lol
The guide on the OP is more stable and working proof. Also, more detailed, with opportunity of changing the title's bar background and the title's bar icon.
lol. I don't know what you mean by "STABLE", so I can't speak on that
About working proof, what can be better working proof than Cosmic v3
Title Bar's background and icon both can be changed by that method
Don't misunderstand me, just trying to share another method with people.
PS - You will want to include (if not already) that editing AndroidManifest.xml of system app will require to sign it, and if you want it working on your device, you'll have to disable signature check from service.
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?