Changes between Version 13 and Version 14 of question_new
- Timestamp:
- 08/28/2014 03:03:35 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
question_new
v13 v14 22 22 处理二:使用AsyncTask异步更新UI界面[[BR]] 23 23 24 处理三:Handler+Looper+ MessageQueue[[BR]]24 处理三:Handler+Looper+!MessageQueue[[BR]] 25 25 26 处理四:异步多线程类的封装,模拟android AsyncQueryHandler 这个类封装,这样代码比较简洁,一般命名为[http://www.cnblogs.com/xitang/archive/2011/09/21/2184452.html AsyncWorkHandler][[BR]]26 处理四:异步多线程类的封装,模拟android !AsyncQueryHandler 这个类封装,这样代码比较简洁,一般命名为[http://www.cnblogs.com/xitang/archive/2011/09/21/2184452.html AsyncWorkHandler][[BR]] 27 27 28 28 感觉最佳方式是AsyncTask,线程池可以免去新建线程的开销[[BR]] 29 “ AsyncTasks should ideally be used for short operations (a few seconds at the most.) ”不过文档建议如果太长的操作还是自己使用java.util.concurrent 类来做[[BR]]29 “!AsyncTasks should ideally be used for short operations (a few seconds at the most.) ”不过文档建议如果太长的操作还是自己使用java.util.concurrent 类来做[[BR]] 30 30 31 31 AsyncTask的本质是一个线程池,所有提交的异步任务都会在这个线程池中的工作线程内执行,当工作线程需要跟UI线程交互时,工作线程会通过向在UI线程创建的Handler[[BR]]
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)