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 onRetainNonCon
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
> Ok ive put a thread sleep inside the doItInBackground and it seems to
> refresh when i rotate while the task is running so the que
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
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 wrote:
> 2011/10/4 João Rossa
>
>> Also is there a problem refreshing the contents inside the
>> doItinBackgr
2011/10/4 João Rossa
> 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.
Also is there a problem refreshing the contents inside the
doItinBackground???im using the runOnUIThread to refresh the views inside
the updateResultsInUi()
regarids
2011/10/5 João Rossa
> You're right that was a mistake while copying the code to here, its
> currently like this:
>
> @Override
You're right that was a mistake while copying the code to here, its
currently like this:
@Override
protected String doInBackground(Void... params) {
return activity.updateResultsInUi();
}
its the instance of the activity that is pased in the constructor.
On Tue, Oct 4, 2011 at 7:18 PM, TreKin
2011/10/4 João Rossa
> I posted the code there..there are no static methods,
>
You have
*public abstract class ParentActivity extends Activity*
Then in your separate AsyncTask class you have:
*@Override*
* protected String doInBackground(Void... params) {*
* *
* return ParentActivity.updateRe
I posted the code there..there are no static methods, anyway how do i save
the activity(as in the views that are filled) either on rotation *while and
after *the task is running?
regards,
On Tue, Oct 4, 2011 at 1:47 PM, TreKing wrote:
> On Tue, Oct 4, 2011 at 4:14 AM, Bluemercury wrote:
>
>> T
On Tue, Oct 4, 2011 at 4:14 AM, Bluemercury wrote:
> The only static variable in use is an int, for maintaining the state of a
> progress bar while switching activities. the updateResultsinUi() is an
> abstract method tha is implemented by sub activties classes.
Um, well, then your code makes n
The only static variable in use is an int, for maintaining the state of a
progress bar while switching activities. the updateResultsinUi() is an
abstract method tha is implemented by sub activties classes.
regards,
--
You received this message because you are subscribed to the Google
Groups "A
2011/10/3 João Rossa
> public ActivityTask(QuadrosMobileActivity activity) {
>
> attach(activity);
> }
>
> @Override
> protected String doInBackground(Void... params) {
> return ParentActivity.updateResultsInUi();
> }
>
You seem to be randomly interchanging instance and static use.
updateResul
Never mind the name of the async taskits ParentActivityTask.
2011/10/4 João Rossa
> Actually my async task is not a inner static class, and it still has a
> explicit reference to the activity that i refresh,
>
> *here's the parent activity:*
>
> public abstract class ParentActivity extends A
Actually my async task is not a inner static class, and it still has a
explicit reference to the activity that i refresh,
*here's the parent activity:*
public abstract class ParentActivity extends Activity{
protected static int progressBarstate=ProgressBar.GONE;
protected static int themeId;
pr
On Mon, Oct 3, 2011 at 5:28 PM, Studio LFP wrote:
> When this happens, you need to save off the position in your AsyncTask and
> restart it back when the activity gets restarted.
The OP is using getLastNonConfigurationInstance(), which would indicate he's
keeping the same AsyncTask instance acr
If you aren't using the android:configChanges tag on your activity in the
AndroidManifest.xml then you application is getting killed and restarted on
rotation or keyboard changes like when someone slides out a hardware
keyboard. When this happens, you need to save off the position in your
Async
16 matches
Mail list logo