Creating Dynamic Icons for MIUI V5 Themes

There are some really nice and advanced features in MIUI v5 that go by without getting proper recognition. One of the features we are going to cover today is ‘Dynamic Icons’. Tutorial specialist & theme developer Hadron has created a simple guide on how these ‘Dynamic Icons’ work and also, how to create them!

Creating your own Dynamic Icons for MIUI V5 Themes

Creating a MIUI V5 Dynamic ICON is very easy and it Follows the Lock screen Variables syntax. All you need to do is put your manifest.xml and icons in following folder, for example in the case of Dynamic Calendar Icon :

Icons

| __ fancy_icons

|__ com.android.calendar

The manifest.xml follows the same syntax as the lock screen manifest.xml. So its very easy to create. For example for the Calendar 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>

dynamic deskclock icon

The Deskclock Icon will show the analog time on the icon and Notes Icon will show the text from your Notes. Amazing! You just need to put the folder in the icons folder of your theme following the above said folder format and then pack it all together in the same method as used to create a theme and apply it within the MIUI Theme Manager. Hadron goes on to explain a little about the use of Variable Updater.

This system variable will let you control how often your variable (Icons in our case) should update. For example the Calender should update per day but for the Dynamic Deskclock Icon it should update every second.

Supported values are : Battery, DateTime.Day, DateTime.Hour, DateTime.Minute, DateTime.Second

Of course the less often it updates the better as it saves on resources, especially when it comes to battery usage. If your Icon doesn’t depend on time or battery put useVariableUpdater = “none”

Dynamic Advanced and Default Icons Scripts are attached below.  Feel free to modify these according to your own needs and don’t forget to credit! :-)

[attachments fields="title,size" docid="366,365"]

Have more questions ? Feel free to ask Hadron in his Dynamic Icons Thread