tags:

views:

37

answers:

2

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

A: 

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

CommonsWare
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
You are right. The issue was with width and height.
Prabhat