扩展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.

你可能感兴趣的:(thread,UI,wordpress,UP,idea)