Skip to content Skip to sidebar Skip to footer

Force Orientation To View

I have three different views for just one activity. These three views are stored in three different xml files. I know it's possible to force activities orientation with this part o

Solution 1:

You could take a look at setRequestedOrientation(int). Just call it after you set your view.

http://developer.android.com/reference/android/app/Activity.html#setRequestedOrientation(int)

You might want to look at adding android:configChanges="orientation", which let's Android know you are taking care of the orientation changes yourself.

Post a Comment for "Force Orientation To View"