1

I have an application which is in portrait mode. However, I want to run a particular activity in landscape mode. I have tried the following with no success.

1. android:screenOrientation="landscape" in AndroidManifest.xml
2. this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); in activity requiring landscape mode

as specified here. Please help. Thanks

Community
  • 1
  • 1
Prabhat
  • 2,261
  • 7
  • 46
  • 74

1 Answers1

1

The manifest solution supplied in the question you linked to definitely works. Here is a sample project using android:screenOrientation="landscape".

Community
  • 1
  • 1
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks for quick reply. It doesn't work. Actually, what happens in this case is, when I go to activity which requires landscape mode, the activity doesn't begin, I see toggling of landscape mode to portrait for some time and screen goes blank. :( – Prabhat Aug 06 '10 at 10:23