Android Screen Orientation Set setScreenVertical(Activity activity)

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

Description

set Screen Vertical

Declaration

public static void setScreenVertical(Activity activity) 

Method Source Code

//package com.java2s;

import android.app.Activity;

import android.content.pm.ActivityInfo;

public class Main {
    public static void setScreenVertical(Activity activity) {
        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }//from  www  .j av a 2s . c  om
}

Related

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