Click here to Skip to main content
13,632,483 members
Rate this:
Please Sign up or sign in to vote.
See more:
I know that the 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 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
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 | Cookies | Terms of Service
Web03-2016 | 2.8.180712.1 | Last Updated 14 Sep 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

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