[PC] MIUI Theme Editor + All Files & Tutorials





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.
Download the Theme Editor and Run it.
first time it may have the interface in chinese. So here is how to change it :




  • Creating an New theme
Go to Fle > 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
All the buttons are self explanatory but i will add some description where needed

  • 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
Now Some information about diffrent Tabs and options on them.


  • 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
To change the text colors of the module items, click on the "change edit mode" button while contacts module is stille open. see bellow.




  • Important
Do the same procedure for all the Modules and modify PNG's and color's in it. Framework-miui-res and Framework-res are most important modules. Changes in Framework-miui-res effects all the MIUI applications, especially colors and Changes in Framework-res module can effect both MIUI apps and any other 3rd party app so be careful !!!! you might get white on white color problem.
  • Testing
Now its time to test your theme before release/share. You should test all the MIUI apps for proper theming as well as 3rd party apps for color problems. If you find any problem then just reopen or drag drop you theme directory on Theme Editor to reopen /edit your theme.

  • 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
Creating MIUI V5 Dynmic ICON is very easy and it Follows the Lock screen Variables syntax. you need to put your manifest.xml and ICONs in following folder, for example in case of calender

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.
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- calendar -->
  3. <Icon version="1" frameRate="0" width="136" height="136" screenWidth="720" useVariableUpdater="DateTime.Hour">
  4. <Group pivotX="68" pivotY="68">
  5. <Image x="68" y="68" align="center" alignV="center" src="calendar_icon.png" srcid="#date" />
  6. </Group>
  7. </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
It been a big problem for theme maker when some of unwanted contents and text color get themed and give you problem. NOT ANY MORE. now you can put a filter in framework-miui and put the packege name you want to theme. other packages will remain safe. So no side effects. for example
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.

  1. <filter path="myframework">
and the whole filters.xml file may look like this depending on packages you choose.




  1. <?xml version="1.0" encoding="utf-8"?>
  2. <MIUI_Theme_Filters>
  3. <filter path="myframework">
  4. <package>com.android.contacts</package>
  5. <package>com.android.providers.contacts</package>
  6. <package>com.android.deskclock</package>
  7. <package>com.android.fileexplorer</package>
  8. <package>com.android.mms</package>
  9. <package>com.android.packageinstaller</package>
  10. <package>com.android.providers.downloads.ui</package>
  11. <package>com.android.providers.media</package>
  12. <package>com.android.settings</package>
  13. <package>com.android.systemui</package>
  14. <package>com.android.thememanager</package>
  15. <package>com.android.updater</package>
  16. <package>com.miui.antispam</package>
  17. <package>com.miui.home</package>
  18. <package>com.wali.miui.networkassistant</package>
  19. <package>com.android.phone</package>
  20. </filter>
  21. </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.







DOWNLOAD MIUI THEME EDITOR

Post a Comment

0 Comments