Java tutorial
//package com.java2s; // Released under the Apache License, Version 2.0 import android.view.Display; public class Main { /** * Calls {@link Display#getRotation()} * * @return one of {@link android.view.Surface#ROTATION_0}, * {@link android.view.Surface#ROTATION_90}, * {@link android.view.Surface#ROTATION_180}, * or {@link android.view.Surface#ROTATION_180}. */ public static int getRotation(Display display) { return display.getRotation(); } }