This example describes the Android programming approach that is similar to the fast flashing effect of Alipay balances. Share to everyone for your reference, specific as follows:
The effect is as follows:
This picture doesn't move, but it actually beats fast.
Before seeing the effect of paying treasure is very good. is to go in to see the balance snoring direct shangcuanxiatiao to specific numbers, the effect of handsome, but do not know how to achieve, recently finally know.
Ideas:
The countdown operation is often used first. This class is countdowntimer.android. Inherit this class. Is nothing more than the beating of increase and intervel.
Increase the number and spacing! You know. Go on.. Then let him quickly jump from a certain number to the specific total number, no nonsense. Look at the demo to see the effect
Code:
Direct Call Execution:
private void Initallviews () {
Mydancetimer = new Dancewagetimer (Dancewagetimer.gettotalexecutetime (Mymoney, 100), Tvmoney, Mymoney);
Mydancetimer.start ();
}
/**
* @Title gettotalexecutetime
* @Description Total Execution Time
* @param totalwage
* @return
* * public static int Gettotalexecutetime (float totalwage, int interval) {
int wage = getintegerofwage (totalwage);
int startnum = Getstartnum (totalwage);
int increased = getincreased (startnum);
int result = (Wage-startnum)/increased * interval;
return result;
}
Full instance code code click here to download the site.
I hope this article will help you with the Android program.