Android Screen Orientation Set setScreenHorizontal(Activity activity)

Here you can find the source of setScreenHorizontal(Activity activity)

Description

set Screen Horizontal

Declaration

public static void setScreenHorizontal(Activity activity) 

Method Source Code

//package com.java2s;

import android.app.Activity;

import android.content.pm.ActivityInfo;

public class Main {
    public static void setScreenHorizontal(Activity activity) {
        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    }//w w  w.  j  ava  2 s.  c  om
}

Related

  1. getDisplayRotation(Activity activity)
  2. setScreenVertical(Activity activity)
  3. setOrientation(Activity activity, String orientation)