首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

扩张AysncTask

2012-09-09 
扩展AysncTask本文来自http://sirinsevinc.wordpress.com/2010/05/11/118/Creating a progressDialog in t

扩展AysncTask

本文来自http://sirinsevinc.wordpress.com/2010/05/11/118/

Creating a progressDialog in the constructor and displaying it immediately and dismissing it in onPostExecute method. Unfortunately this didnt work because UI thread was blocked by the ProgessDialog, it was tied to it and that’s why it wasn’t possible to dismiss the dialog. Finally I came up with another idea. First I created another class “ProgressTimedTask” which extends AsyncTask. It has a progressDialog as a member field. The source code looks like this.

热点排行