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.