set Screen Vertical - Android android.app

Android examples for android.app:Screen

Description

set Screen Vertical

Demo Code

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 w  w w .jav a2  s  .com*/

}

Related Tutorials