小米手机主题DIY图片特定时间显示代码
其实不论什么品牌的手机,充电的时候都会有特定的图片或者是动画出现。
小米手机默认主题锁屏是这样的。
充电的时候就会出现这样的动画。这到底是如何做到的呢?其实很简单,你只需用如下代码:
<Image x="0" y="0" category="Charging">
<SourcesAnimation>
<Source src="cd1.png" time="250"/>
<Source src="cd2.png" time="500"/>
<Source src="cd3.png" time="750"/>
<Source src="cd4.png" time="1000"/>
<Source src="cd5.png" time="1250"/>
</SourcesAnimation>
</Image>
在代码第一行中category="Charging" 代表充电中、category="BatteryFull" 代表充满电、category="BatteryLow"代表快没电了。
代码第二行代表播放动画,SRC=动画的每帧图片,time=就是每帧图片出现的时候。
每次,就是如此简单,你就实现了充电显示动画。
你还可以设定在某些节日里出现或消失某些特定的图片。
特定时间显示代码:
<Group visibility="eq(#month+1,9)*eq(#date,19)">
<Image x="#unlock-1250" y="#unlock-1250" src="zsj.png" />
</Group>
把要显示的写在两个Group之间 《#hour12、#hour24、小时、#minute分钟、#month+1月、(#date日》
特定时间消失代码:
1. <Group visibility="not(eq(#month+1,9)*eq(#date,19))">
2. <Image x="#unlock-1250" y="#unlock-1250" src="zsj.png" />
3. </Group>
把不显示的内容写在以下代码(两个Group之间)
是不是觉得非常简单,懂代码的人一看就明白了。
#build-it #cn-reader #cn-curation #whalepower #cn-stem #steemstem #cn-programming #palnet #zzan #mediaofficials #actnearn #marlians #neoxian #lassecash #upfundme #sct #sct-cn #sct-freeboard
感谢持有2.00 NBC(NewBies Coin)! 由于你使用CN作为你的首标签,额外获得2%点赞! 你的帖子获得team-cn 4% 点赞!(如果不想看到这个回复,请回复“取消”)
Thank you for supporting @CatsMakeKittens by being a part of our community @hykwf678233.
Each CATS you purchase gets you daily upvotes from me @CatScientist as our community grows so do your rewards for being a member!
吃了吗?来 @steemgg 玩游戏吧,决战到天亮倘若你想让我隐形,请回复“取消”。
Hi, @hykwf678233!
Thank you for using the #build-it tag. This post has been rewarded by @build-it.curator with BUILD tokens in the form of an upvote. Build-it is a new tribe on the steem blockchain that serves as a central hub for DIY contents on steemit.
We encourage steemians to post their DIY articles via our website. Have a question? Join us on Discord and telegram
This project is run and supported by our witness @gulfwaves.net. If you like what we do, vote for us as a witness on the steem blockchain.