On Tue, Mar 9, 2010 at 4:48 AM, LeGeNDuS <[email protected]> wrote:

> classcodecategory and classtexout are fields of the class. I suppose
> that the problem is that....when I change the orientation...it only
> keep the negattive button because it is a normal text (no
> contextualized of that fields). So when I change the orientation,
> classcodecategory and classtextout lost their values. And when it goes
> to change the dialog  (for the orientation change) it fails for that
> (because those fields are used to show in the dialog). Maybe should I
> use sharedprefrences to keep those values?.
>

That shouldn't make a difference, I don't think, as the dialog should retain
it's state as it was after it was created - so the parameters used to create
it shouldn't matter at that point. I wouldn't use SharedPreferences unless
it made sense to do so (i.e., these values need to persist across
application restarts).

About the second one error (showing another times the dialog) I think
> I must indicate explicitly to close the previous dialog to force using
> onCreateDialog at activity.showDialog... is it right? how can I do it?
>

You COULD call Activity.removeDialog() to force it to be recreated next time
you try to show it, but that's not really necessary. For the 3rd time,
onPrepareDialog() is here for this very reason: to give you the opportunity
to update a previously shown dialog with new information. USE IT.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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

Reply via email to