Notes:
- This Software Is Originaly Made By Various Crew Of MIUI Resource Developers,And All Regards Are Going To Them. -
- All Files & Tutorials Are Collected From Various Internet Forums,So All Regards Are Going To Their Authors.Also They Could Be Used For Creating Themes For Any MIUI Rom For All Supported Devices -
- I'm Not Responsible For Any Eventual Errors And Misbehaving Of Your Devices. -
Quote:
REQUIREMENTS- Java JDK 1.6. or newer - (Included)
- Windows/Mac/Linux
- Notepad++
- Winrar, 7zip or similar
- Understanding of apk tool/manager - Decompiling and Compiling apks for images/pngs/xml codes
- Understanding of 9-Patch (.9. png) Image
- Image Editing Software e.g. GIMP, Photoshop
- Working ADB Drivers on your PC
- Android Phone with MIUI on it.
- NinePatchEditor (Optional) - (Included)
- MIUI Theme Editor
Quote:
TUTORIAL- Setting up English Language.
first time it may have the interface in chinese. So here is how to change it :
- Creating an New theme
and you will see the window below. In put the name of your theme and save it.
Then you will see the following window. ( Description in screen shot )
- Buttons
- Save : This is to save the changes made to the projects.
- Generate full MTZ : This is used to compress and make the mtz file of the theme project to be used in phone
- Apply Recent Changes : For this and next option to work your phone must be connected to PC. this option apply the recent theme changes to your connected phone (Useful when testing a smal change).
- Full apply: This option apply the Full theme to your Phone.
- Reload: This option will discard unsaved changes and will load the theme from theme directory (added PNG's Will stay there, will be explained later)
- Setting: Have only option to copress the font if you want.(Have'nt used it).
- Different Tabs and their Functions
- Description Tab: Already explained in screen shot shown above.
- Icons Tab: This tab is used to add icons to theme.When you click on the icon tab it have three further tabs, System icons, Default theme icons and Others. Before you proceed further Click on Sync button at the bottom of the icons. (Your phone must be connected in debug mode to the PC) This sync option will get all default icons from your phone including 3rd party apps. Now to change any Icons check below.
on the default theme icons tab there are some default 3rd party icons avialable in theme editor and others tab have the icons repalcement option for apps installed in your phone. procedure is same for all three tabs
Note. you dont need to rename your icon, Progran will do it for you! just drop it to the proper place.
Thats it if you just want to creat new icon pack. Just click on create full MTZ button and copy the mtz file to your phone and import it to theme manager or just click complete apply to your theme. But if you want to theme your Apps and change text colors then read on
3. Modules tab: This tab is the most important tab for themeing MIUI.
- Creating New App Module
Here is how to create the App's theme module.
As an example I have selected the Contacts module (only one module at a time). you will see screen shown below , if different then click "change edit mode" button.
Now click on the first item in the folder view and follow the screen shot. again names of your png's does not matter. you have to go through all the view and find the red boxes, click on it and replace the png's you want to change. If you want to keep the system default png just leave it blank.
For modifying PNG's you can use the V4_templete (link at top) png's as a refrence. you can edit them to your requirements and then use them.
- Changing the text Color
- Important
- Testing
- Editing *.9.png files
First you should understand what are 9-patch or *.9.png files
This is a good description on android developer
Editing is not so difficult as we dont have to compile the 9.png's for MIIUI theme editor. It it required for AOSP android themeing but MIUI Theme editor do it automatically.
So here are the steps
- Take any old 9.png file and open it in any Image editor mensioned in the first post
- First thing you will notice, is a black line at the right and bottom of the image. and a dot or small line at the top and left side of the image. you need to remove these lines. actualy you should crop out these one pixel lines from the image.
- Or you can just create a new image.
- Modify the png file the way you want and save to your computer.
- Now open that image into Draw-9-Patch tool or NinePatchTool( I recomend later because its too tedious to draw borders in Draw-9-Patch )
- Open the modified file the patch editor.
- Draw the content and strech borders, (if you dont under stand it then just made the borders like in origional png)
- save it and Use it in theme editor
- Creating Dynamic ICONs for MIUI V5 Themes
Icons
| __ fancy_icons
|__ com.android.calendar
manifest.xml follow the same syntax as the lock screen manifest.xml. so its easy. for example for callender you need to put following code in the manifest.xml.
- <?xml version="1.0" encoding="utf-8"?>
- <!-- calendar -->
- <Icon version="1" frameRate="0" width="136" height="136" screenWidth="720" useVariableUpdater="DateTime.Hour">
- <Group pivotX="68" pivotY="68">
- <Image x="68" y="68" align="center" alignV="center" src="calendar_icon.png" srcid="#date" />
- </Group>
- </Icon>
I am included some examples for Deskclock and Notes dynamic ICONS. The Deskclock ICON will show the Analog time on the icon and Notes Icon will shou the text from your Notes. Amaizing .You just need to put the folder in icons folder of your theme following the above said folder format and just compress it and apply.
A little about useVariableUpdater
This system variable let you control that how often your varilable (Icons in our case) shoud change. for example in case of caleder it is enough to update once a day. but for deskclock icon it should be updated every second.
Supported values are : Battery, DateTime.Day, DateTime.Hour, DateTime.Minute, DateTime.Second
less often is the better to save resources. If your Icon doesn't depend on time or battry put useVariableUpdater = "none".
- MIUI V5 Theme Filter Feature
put the follwing code in filters.xml file and put the file in framework-miui-res folder of your theme.Themes are getting better and better for MIUI V5.
More detail
You need filter to only allow certain apps to use themes resources from "framework-miui-res" Module and avoid all other application to use ur themed resources from "framework-miui-res" module, it has nothing to do with package's independent folder files .
To do that you create a filter file as shown below and put it in "framework-miui-res" module folder and then make another folder with any name you want for example "myframework"
Dont put any other file out side that (myframework) folder except the filters.xml file and then put all the themed files of "framework-miui-res" into "myframework" folder (the res folder and theme_values.xml). Now include the "myframework" name in the filers.xml path line as shown below.
- <filter path="myframework">
- <?xml version="1.0" encoding="utf-8"?>
- <MIUI_Theme_Filters>
- <filter path="myframework">
- <package>com.android.contacts</package>
- <package>com.android.providers.contacts</package>
- <package>com.android.deskclock</package>
- <package>com.android.fileexplorer</package>
- <package>com.android.mms</package>
- <package>com.android.packageinstaller</package>
- <package>com.android.providers.downloads.ui</package>
- <package>com.android.providers.media</package>
- <package>com.android.settings</package>
- <package>com.android.systemui</package>
- <package>com.android.thememanager</package>
- <package>com.android.updater</package>
- <package>com.miui.antispam</package>
- <package>com.miui.home</package>
- <package>com.wali.miui.networkassistant</package>
- <package>com.android.phone</package>
- </filter>
- </MIUI_Theme_Filters>
and your "framework-miui-res" folder diretory structure may look like this
mytheme
|
|--com.android.contacts
|
~
~
|--framework-miui-res
|
|--filters.xml
|
|--myframework
|
|--theme_values.xml
|
|--res
|
|--drawable-xhdpi
|
|--drawable-hdpi
Now because of path varible in filters.xml only the packages included in the filters will have access to resources inside myframework folder.
Please Note that for packages folder itself work like before, you dont need to move them into "framework-miui-res" folder. You just need to add the package name in the filter list of filters.xml. and you can still theme any package which is not included in the filter list, But important thing is it will not be able to access the files inside the myframework and will use stock files instead if needed any.
0 Comments