- Do not block the UI thread
- Do not access the Android UI toolkit from outside the UI thread
Therefore, only use UI thread message queue to update UI components.
If task is heavy, do the heavy-lift job on another thread and create a callback on UI(main) thread for the worker thread to call back.
A better way is to use AsyncTask straight away.
No comments:
Post a Comment