On Wed, Dec 8, 2010 at 9:50 AM, NewB <[email protected]> wrote:

> But by doing so, the screen changes orientation first and then tries to
> display the dialog. But on orientation change the screen is
> restarting the activity and my dialog isn't shown. Is there a simpler way
> to do this?
>

Use showDialog(int) to have the system manage the dialog for you across
orientation changes.

Though I really question the logic of forcing the user to view the dialog in
one orientation that may differ from what they're currently viewing.

Could I use two different layout for the dialog and load a corresponding one
> depending on the orientation?


Yes, and that's probably preferred.
http://developer.android.com/resources/samples/MultiResolution/index.html


> If so, then what would the XML for the portrait mode  look like?


That's up to you.

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