Android programming realizes a fast flashing effect similar to Alipay balance _android

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.