Skip to content
Stanislav Koshutsky edited this page Mar 2, 2017 · 3 revisions

OrientationUtils methods are obviously intended to manage device orientation. It has following methods

public static void lockOrientationLandscape(Activity activity)

Locks the device window in landscape mode.

public static void lockOrientationPortrait(Activity activity)

Locks the device window in portrait mode.

public static void lockOrientation(Activity activity)  

Locks the device window in actual (atm of executing) screen mode.

public static void unlockOrientation(Activity activity)  

Unlocks the device window in user defined screen mode.

public static int getManifestOrientation(final Activity activity){

Returns activity orientation declared in Manifest. Its one of constant values representing orientation

Clone this wiki locally