Click here to Skip to main content
13,144,265 members (36,360 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
I know that the handler.post() method, Causes the Runnable r to be added to the message queue. The runnable will be run on the thread to which this handler is attached.

But my question is that if I use a handler.post inside the onCreate() method does the runnable in the message queue is executed after the completion of onCreate() method, ??

please can anyone clear my doubt

What I have tried:

i have searched many sites but i can't find when are these runnables in the message queue are executed.
Posted 14-Sep-17 4:08am
Comments
David Crow 14-Sep-17 12:14pm
   
The Runnable object will be called on the main thread. The Handler class is simply used for posting a message to the thread to which it is attached/created. It does not create a thread on its own. You might find differences between run() and start(), however.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web03 | 2.8.170915.1 | Last Updated 14 Sep 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100