If a handler was created in the main user interface thread, does the message with Runnable create a child thread that is added to the message queue, or does it just start in the user interface thread?
handler.post(new Runnable(){ public void run() { // do stuff } });
No, it does not create a new thread. It just executes your runnable on the thread your handler is attached to, which in this case means your UI thread
handler.post(new Runnable()){ public void run(){ //do something } });
this does not guarantee that it will create a new thread.it, it will just call the runnable thread in which the handler is attached (the UI thread is here).
, , ( ), , .