Multiple Threads, one handler

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Multiple Threads, one handler

Postby redviking63 » Mon Jan 23, 2012 9:08 am

New to Android here. I have an application which needs to use several threads for various tasks. Most of those tasks will result in an update to the UI. I have read many tutorials on threading and understand the use of the handler to update the UI and I have this working for the first of my threads. However, I am wondering if it is common/best practise to use a separate handler for each thread OR to pass the same handler to each thread and use msg.what (for example) to determine which thread is sending the message an update the UI accordingly.

Posts: 2
Joined: Fri Dec 24, 2010 10:51 am


Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests