List of usage examples for android.app Activity setRequestedOrientation
public void setRequestedOrientation(@ActivityInfo.ScreenOrientation int requestedOrientation)
From source file:Main.java
public static void setScreenHorizontal(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); }
From source file:Main.java
public static void setPortrait(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); }
From source file:Main.java
public static void SetOrientation(Activity act, int orien) { act.setRequestedOrientation(orien); }
From source file:Main.java
/** * Unlock the orientation of the device//from w w w . j a v a 2s. c o m * * @param context the current Activity context */ public static void unlockScreenOrientation(Activity context) { context.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); }
From source file:Main.java
private static void rotateToPortrait(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); }
From source file:Main.java
private static void rotateToLandscape(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); }
From source file:Main.java
public static void setScreenVertical(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); }
From source file:Main.java
/** * Unlocks specified activity's orientation. * * @param activity activity//w w w . j a v a2 s . c o m */ public static void unlockOrientation(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); }
From source file:Main.java
public static void setScreenLandscape(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); }
From source file:Main.java
public static void setScreenPortrait(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); }