Java tutorial
//package com.java2s; import android.view.Surface; public class Main { /** * @return the current display rotation in degrees */ public static float getDegreesForRotation(int value) { switch (value) { case Surface.ROTATION_90: return 90f; case Surface.ROTATION_180: return 180f; case Surface.ROTATION_270: return 270f; } return 0f; } }