November 26th, 2011, 06:44 AM
|
#1 (permalink)
|
|
New Member
Join Date: Nov 2011
Posts: 2
Device(s):
Thanks: 1
Thanked 0 Times in 0 Posts
|
Wanna know about Runnable and Handler
Hi All,
I'm newbie to android.and i have some doubts about Handlers and runnable.
1.
Code:
mHandler.postDelayed(mUpdateTimeTask, 5000);
where mUpdateTimeTask is the object of runnable.
a)when the above call add the message in to the message queue.imm or after 5 sec.
b)How they are achieving 5 sec delay, Is there any thread running background ?
2.
Code:
private Runnable mUpdateTimeTask = new Runnable() {
public void run() {
}
}
a) will the above code create a thread, If yes , what would be the thread name and priority? If No, is it act as a Callback in this context?
Regards,
Gobi.S
|
|
|