So what is the other solution? I have same problem as you. On Monday, August 17, 2009 6:52:13 PM UTC+3, Tom wrote: > > Ok I understand well that is a bad idea. > Before that, I tried to change views in the onPostExecute() method. > But unfortunately, I didn't manage to do what I wanted to do. > The main errors were that I couldn't modify the view. > So I decided to try an another way. > > Thanks for the answers. > > I'll keep going on your way. > > > > On 17 août, 17:39, Romain Guy <[email protected]> wrote: > > When the task finishes, onPostExecute() is invoked. You can use this > > method to change views. Making the main thread wait for the AsyncTask > > is a bad idea since it would just go against the entire purpose of > > AsyncTask. > > > > > > > > On Mon, Aug 17, 2009 at 8:36 AM, Tom<[email protected]> wrote: > > > > > At first, my asyncTask show a progress dialog to prevent users. > > > it's used to download some informations from a web server. > > > > > Then, I would like, in fact, wait for the end of the asyncTask in > > > order to continue some stuff on the main thread. > > > cause I can't modifiy the main view in the asyncTask. > > > > > Regards > > > Tom > > > > > On 17 août, 16:52, Mark Murphy <[email protected]> wrote: > > >> Tom wrote: > > >> > I use a subclass of AsyncTask in the main Thread. > > >> > I would like the main Thread wait for the end of the AsyncTask. > > > > >> Please please please please please do not do this. > > > > >> At best, your users will wonder why the application is frozen. > > > > >> At worst, Android will wonder why the application is frozen and will > > >> kill off the flawed activity. > > > > >> -- > > >> Mark Murphy (a Commons Guy)http://commonsware.com| > http://twitter.com/commonsguy > > > > >> Warescription: Three Android Books, Plus Updates, $35/Year > > > > -- > > Romain Guy > > Android framework engineer > > [email protected] > > > > Note: please don't send private questions to me, as I don't have time > > to provide private support. All such questions should be posted on > > public forums, where I and others can see and answer them
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

