[MIUI Theme Tutorial] Auto-changing Lockscreen Wallpapers [Video Tutorial]

label
label
label
label


Hello all.
I am here again to teach you how to create a auto-changing lockscreen wallpaper effect on lockscreen. Everytime you turn on your phone you will be greeted with a new lockscreen wallpaper. It will just 2 minute of your time and only 3 steps.

Video Tutorial: [Watch this for better Understanding]




Steps:

initially create a folder named under the folder lockscreen/advance/

Put all the locksreen wallapaers (size: 1080x1920) in that folder starting with the name 1.png2.png, ... , anynumber.png. Make sure all the numbers are in sequence.


1. Open menifest.xml of your lockscreen folder

Check if your lockscreen already have <ExternalCommands> tag at starting

a) If it don't contain this tag then 
paste the below code:



<ExternalCommands>
<Trigger action="pause">
<Command target="s_number.animation" value="play" />
</Trigger>
</ExternalCommands>

b) If <ExternalCommands> tag is alredy there, then paste below code inside existing <ExternalCommands> tag.


<Trigger action="pause">
<Command target="s_number.animation" value="play" />
</Trigger>

2. Then Paste below code in the variable space of menifest.xml.


<Var name="s_number" expression="ifelse(not(#s_id),int(rand()*5+1),#s_id)" const="true" />

Note: The Number in the above code says you can put 5 lockscreen wallpapers in the s folder. You can change the value according to your number of lockscreen wallpapers in the s folder. 

3.  Paste below code after <wallpaper /> tag


<Image x="#screen_width/2" y="#screen_height/2" w="#screen_width" h="#screen_height" srcExp="'s/'+#s_number+'.png'" align="center" alignV="center" />   

You are done with codes. 

You can see some sample themes here:
Share This :



sentiment_satisfied Emoticon