dharan
dharan

Reputation: 753

Activity not changing from portrait mode to landscape mode in android

I am trying to change orientation from portrait to landscape for an Android activity. But it is not changing to landscape.

I mention the activity in the manifest file as follows:

<activity
    android:name=".OpenFileActivity"
    android:label="@string/app_name"
    android:configChanges="orientation|keyboardHidden"
    android:exported="false">

But I am unsuccessful. Can any one tell me why that is?

Upvotes: 2

Views: 1657

Answers (2)

Buda Gavril
Buda Gavril

Reputation: 21647

please check in your phone's settings that screen rotation is enabled.

Upvotes: 3

Ion Aalbers
Ion Aalbers

Reputation: 8030

You should set the android:screenOrientation="landscape"

Source: http://developer.android.com/guide/topics/manifest/activity-element.html#screen

Upvotes: 1

Related Questions