You can't do this.  When you change the orientation, you are rotating the
entire screen.

On Tue, Apr 7, 2009 at 3:30 PM, Michael Bollmann <
[email protected]> wrote:

>
> Thanks very much. This solved a part of the problem but it's still
> pretty bad.
>
> Sub is actually a dialog.
> So when Sub is opened the windowmanager or whoever tries to flip
> Main which is visible behind Sub.
> However Main is not suitable for landscape and the paint thread of
> Main is already
> sleeping at this point.
>
> What i want is that Main is left alone and the windowmanager should
> only
> flip the dialog.
>
> Main is configured as android:configChanges="keyboard|keyboardHidden|
> orientation"
> so i read Context.getResources().getConfiguration().orientation at
> onConfigurationChanged
> which says "user" inside Main which is absolutely wrong since i want
> Main to be locked
> in portrait.
>
> Another problem is that it takes about 10 times longer to open Sub in
> landscape compared
> to portrait accompanied with the following line in logcat.
> WARN/SurfaceFlinger(12402): timeout expired mFreezeDisplay=0,
> mFreezeCount=1
>
> Any ideas?
>
> On Apr 7, 11:06 pm, Ward Willats <[email protected]> wrote:
> > Set android:screenOrientation on sub to "user"
> >
> > >Let's assume i got two activities "Main" and "Sub"
> > >Activity "Main" is forced into portrait orientation using
> > >setRequestedOrientation
> > >At some later point "Main" runs "Sub" using startActivityForResult
> >
> > >Somehow "Sub" also starts in portrait orientation while i would expect
> > >the call
> > >to setRequestedOrientation only to affect the calling activity.
> >
> > >How do i get "Sub" to respect the system orientation while keeping
> > >"Main" locked in Portrait?
> >
> > >Thanks in advance
> > >Michael
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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