Basic Introduction: http://blog.csdn.net/liuhe688/article/details/6532519
Extended Knowledge: http://blog.csdn.net/pipisky2006/article/details/8535454
http://blog.csdn.net/hitlion2008/article/details/7983449
Lightweight threading
Precautions:
1. Create a new class in the UI thread that implements the Asynctask<params,progress,result> interface
2. Invoke execute (params...params) execution in the UI thread, OnCancel (), Cancel execution
3, OnPreExecute (), OnPostExecute (Result,res), Onprogressupate (progress...values), oncanceles ()---the above methods can change the UI
Doinbackground (params...params)----used to perform time-consuming tasks and not update the UI, where Publishprogress (Progress val) is called to update progress
All of the above methods are automatically called execution, only need to rewrite to
4. One task can only be executed once
5, a Asynctask life cycle, contains the following states:
Pending,running,finished
Is an enumeration saved, using the GetStatus () method to get
Android three-asynctask