runnable object

/ *** * Handler definitions: * Main accept the child thread to send the data and use this data with the main thread update the UI . When an application starts, * Android will first open a main thread (UI thread that is), the main thread for the manag

The general process of using the Handler: 1, first create a Handler object, you can directly use the Handler Handler no argument constructor to create objects, you can also inherit the Handler class, rewrite handleMessage method to create a Handler o

/ *** * Handler definitions: * Main accept the child thread to send the data and use this data with the main thread update the UI. When the application starts, * Android will first open a main thread (UI thread that is), the main thread for the manag

Handler's use of (a) Handler basic concepts: Handler is mainly used for asynchronous message processing: When sending a message, first enter a message queue, send the message function to return immediately, and the other one by one part of the messag

The general process of using the Handler: 1, first create a Handler object, you can directly use the Handler Handler no argument constructor to create objects, you can also inherit the Handler class, rewrite handleMessage method to create a Handler o

First, the definition of thread 1, inheritance java.lang.Thread class. There is a such a run () method, its use should be noted: public void run () If this thread is to use a separate Runnable run object, then calls the Runnable object's run method;

<1> Handler's definition: Major sub-thread to send the data received and used this data with the main thread update UI. Explanation: When the application starts, Android will first open a main thread (UI thread that is), the main thread for the mana

The next section tests for the application UI to provide some tips, especially in the UI thread to help you in dealing with movement, touch screen and key events, and the lock screen. UI thread test Activity programs running in the UI thread in. Once

This is the android to provide a mechanism, handler object will post method, the Runnable object placed inside the implementation of the queue UI, UI consumption of the queue, call the Runnable's run method. Does not generate a new thread here.

Copyright: original works, allowing reproduced, reprinted, please be sure to hyperlink to the original source form of the article indicated, author information and this statement. Otherwise held liable. http://lavasoft.blog.51cto.com/62575/99151 Java

Original Address: http://springhi-2009.javaeye.com/blog/698146 1. Handler's definition: Major sub-thread to send the data received and used this data with the main thread update UI. Explanation: When the application starts, Android will first open a

Reprinted: http://springhi-2009.javaeye.com/blog/698146 <1> Handler's definition: Major sub-thread to send the data received and used this data with the main thread update UI. Explanation: When the application starts, Android will first open a main

<1> Handler's definition: Major sub-thread to send the data received and used this data with the main thread update UI. Explanation: When the application starts, Android will first open a main thread (UI thread that is), the main thread for the mana