How the Looper knows to send the message to Handler?
问题 The question is, where I tell my Thread to use mHandler for the Looper ? Thank you. I am using the below code: class LooperThread extends Thread { public Handler mHandler; public void run() { Looper.prepare(); mHandler = new Handler() { public void handleMessage(Message msg) { // process incoming messages here } }; Looper.loop(); } } 回答1: The question is, where I tell my Thread to use mHandler for the Looper? You don't need to tell it explicitly, because the system (framework) does it for you