Ok if put a thread sleep inside the doInBackground method it will work when changing the screen orientation during the asynctask execution.So how do i save the filler views when changing the screen orientation after the asynctask has completed?In the method:
@Override public Object onRetainNonConfigurationInstance() { if(task!=null) task.detach(); return(task); } the task is saved, but how do i save filler views state? regards, 2011/10/5 João Rossa <joao.ro...@gmail.com> > Im returning the current task state in the onRetainNonConfigurationStance > method, but i assume i need to save here the views filler? > > regards, > > 2011/10/5 João Rossa <joao.ro...@gmail.com> > >> Ok ive put a thread sleep inside the doItInBackground and it seems to >> refresh when i rotate while the task is running so the question now is, how >> do i save the views states when i rotate after the task completes???it wont >> start again because it may not have been gabaged collected... >> >> regards, >> >> >> 2011/10/5 João Rossa <joao.ro...@gmail.com> >> >>> Unfortunately it doesnt seem to be working, at least not when i rotate, i >>> must be missing something here...still let me test this here. >>> >>> regards, >>> >>> >>> On Wed, Oct 5, 2011 at 2:13 AM, TreKing <treking...@gmail.com> wrote: >>> >>>> 2011/10/4 João Rossa <joao.ro...@gmail.com> >>>> >>>>> Also is there a problem refreshing the contents inside the >>>>> doItinBackground???im using the runOnUIThread to refresh the views inside >>>>> the updateResultsInUi() >>>> >>>> >>>> That should work. >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------------------------- >>>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >>>> transit tracking app for Android-powered devices >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Android Developers" group. >>>> To post to this group, send email to >>>> android-developers@googlegroups.com >>>> To unsubscribe from this group, send email to >>>> android-developers+unsubscr...@googlegroups.com >>>> For more options, visit this group at >>>> http://groups.google.com/group/android-developers?hl=en >>>> >>> >>> >> > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en