Android Activity latency jump, androidactivity

Source: Internet
Author: User

Android Activity latency jump, androidactivity

Sometimes we find that some APP boot pages are waiting for a while to be transferred to the Home Page. In fact, they are processing data operations at this time. Today we will simulate the Android Activity delay jump function! In fact, it is very simple to add a piece of code:

New Handler (). postDelayed (new Runnable () {public void run () {// code of the place you want to jump to finish () ;}, 2000); // 2 seconds of Jump Delay



Android: I want to automatically jump from an activity to the next activity with a latency of several seconds.

The page jumps before handler sends a message. The redirection is executed before the message is delayed. Handler. postDelayed (updateThread, 300); put it out of the run method. You did not call the run method in this way.

In android mobile game development, Handler is used to redirect between pages, but the latency is always about 2 seconds. Why?

Game Development does not recommend redirecting between activities. It is normal to jump to an activity with a delay.

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.