Class used to run a message loop for a thread. Threads by default do not have a message loop associated with them; to create one, callprepare()in the thread that is to run the loop, and thenloop()to have it process messages until the loop is stopped. 1 class LooperThread extends Thread { 2 p... Read More
Handy class for starting a new thread that has a looper. The looper can then be used to create handler classes. Note that start() must still be called.1。看source code (省略部分) 1 public class HandlerThread extends Thread { 2 3 int mTid = -1; 4 Looper mLooper; 5 6 /** 7 * Call bac... Read More