On Fri, Aug 19, 2011 at 11:56 PM, Snowak <[email protected]> wrote:

> Let me quote my post:
> "I'm not interested in forcing it to reload in onPrepareDialog,
> because it would require putting this code into every activity which
> use this dialog.".
>


> Do you really think your solution differ in any way?
>

Yes - you're not forcing anything to reload in onPrepareDialog - you don't
have to touch onPrepareDialog. Calling removeDialog() would cause the next
showDialog() to call createDialog() again.


> I would have to call removeDialog in every activity manually!
>

No, you could create a globally accessible function for this or any dialog
that you want to force re-creation on. This is what I do.

SomeStaticClass.showDialog(Activity a, int dialogID)
{
 a.removeDialog(dialogID);
 a.showDialog(dialogID);
}

Now in any activity that uses this dialog, since you already do showDialog()
(one assumes), you instead call the static function.


>  As for the Activity thing, could you give me more details?
>

I don't know what "Activity thing" you're referring to.


> And still the question remains - how can I force the activity to recreate
> all dialogs after orientation changes in elegant way?
>

Not sure what part of the configuration change is causing your issue, so
hard to say.

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