Tuesday, August 14, 2012

[android-developers] How to allow Landscape mode on Transparent / Translucent Activities?

Suppose I have an Activity that uses the transparent theme:
android:theme="@android:style/Theme.Translucent" in the
AndroidManifest.xml.

When my Activity is launched from the Home Screen, most commercial
phones will lock it to Portrait mode only. This is probably because
the Home Screen only runs in Portrait mode, and applying the
Translucent theme to my Activity makes it also lock to Portrait mode.

But I would like to run my Activity in Landscape mode as well. Is this
possible?

For example, is there a way to dynamically remove the Translucent flag
when a landscape orientation change is detected?

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

No comments:

Post a Comment