Thursday, June 30, 2011

[android-developers] Re: Is it possible to fix the orientation of a particular view in Honeycomb?

Yes. I do this all the time.

Let's say you have a vew "A"

layout:

Create a A-port layout, which is just a copy of the portrait oriented
A
Create a new A layout that <include> A-port

layout-land:

Create a A-land layout, which is just a copy of landscape oriented A
Create a new A layout that <include> A-land

layout-xlarge-v11 (or just layout-xlarge):

Create a new A layout that <include> A-land. It's a copy of the A
from layout-land


So, with this setup, on Honeycomb (or any XLARGE device, depending on
the folder you used), the layout used will always be layout-land. On
other devices, it will use the appropriately oriented layout.


On Jun 28, 6:10 pm, Neil <wan...@gmail.com> wrote:
> Hi guys,
>
> In my activity I have a SurfaceView which I want to lock the
> orientation when rotating the device. But I still want other views in
> the activity to be rotated with the device which means I can not use
> Activity.setRequestedOrientation to lock the orientation. So is there
> a way to achieve this?
>
> Thanks.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate