You can specify alternative resources for different orientations as
described here:

http://code.google.com/android/devel/resources-i18n.html#AlternateResources

Or you can swallow the orientation change event by adding this attribute to
the <activity> declaration in the manifest:

android:configChanges="orientation|keyboardHidden"

Adding this attributes means that you'll get a callback to the activity
(onConfigurationChange or something similar) instead of the device handling
the orientation change for you (which is does really clumsily by restarting
your application!)

Of course, not sure what happens if someone *starts *your application in
landscape mode... but maybe you can check for this somewhere else.

On Mon, Nov 24, 2008 at 2:16 PM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> Is there a way to "anchor" views so that they are unaffected by the
> user rotating the device, or flipping out the keyboard?
>
> I have written a simple. mostly text-less game that is neatly laid out
> in portrait mode, but as soon as the device is rotated to landscape
> (I'm using ctrl+f12 in the emulator), the play field is falling off
> the screen.
>
> Ideally what I would like is for the two textviews to move, but for
> everything else to remain where it is. I could however accept a
> compromise and just have the textviews stay in the same place as well.
>
> How might I achieve this?
>
> Thanks,
>
> Redders.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to