I will show you the method that I use in order to do so, and trust me, that was a pain in the neck to find this method, because I had to try hard, make test, theme many apps…
But XDA is a place of sharing, and I want to share my experience with you, so you don’t toil as I did.
This tutorial isn’t for newbies, I would recommend to check XML 101 from @Ticklefish
And the How to theme any android apps guide from me, where I use the color method detailed in the third post.
Once you’re more comfortable with those, you’ll understand better what I’m telling you now.
- XML basics that you can learn with XML 101
- Know how to use apktool (Go there, thanks @A_U, it's pretty old but it can get the job done)
- Being comfortable with sublime text or notepad++ (or another text editing software file "search in folder" feature)
- Know approximately how an apk file works (file structure, check out that: it's a quick summary)
One general method:
Unless you are a genius, you can’t guess how a developer named elements of the app you want to theme in the code.
For example, factory reset in the setting app from Xiaomi is named « master_clear_... »
Several lines referenced the same name:
- master_clear_apply for the apply menu
- master_clear_button for the button to press in order to reset the phone
- etc …
What you want to do in order to find the name of those elements (for example the reset button that someone asked me to erase), you have to find something that characterizes it, something that only this element has, and it can be many things. This thing will help you recognize the element in the code, so you’ll be able to find how it’s named in the code. I call this name a code name, what you should do is find this code name with the method I'll give you, and then search for those codenames in the layout folder.
The posts below will detail methods that I use to find the code name of the element I want to theme.
Update : What I call a code name is called a resource ID
To search for something in every file of one directory, you can use notepad++ or sublime Text (on Linux)