set Screen Horizontal - Android android.app

Android examples for android.app:Screen

Description

set Screen Horizontal

Demo Code

import android.app.Activity;
import android.content.pm.ActivityInfo;

public class Main {

  public static void setScreenHorizontal(Activity activity) {
    activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  }/*from  w w  w. j a v  a 2 s .c om*/

}

Related Tutorials