I have a question about postDelayed. The android docs say that it adds the runnable to the queue and it runs in the UI thread. What does this mean?
So, for example, the same thread I use to create my layout is used to run the Runnable?
What if I want it as an independent thread that executes while I am creating my layout and defining my activity?
Thanks Chris
Yes that would run on the UI thread.
If you want to run a background thread then do it the normal way.
Thread t = new Thread(new Runnable(){});
t.start()
But if you want to change the UI at all in response to something that a background thread might do, then you can use postDelayed().
Any changes to the UI must be done on the main UI thread.