Android examples for User Interface:Screen Orientation
is Screen Orientation Portrait
//package com.java2s; import android.content.Context; import android.content.res.Configuration; public class Main { public static boolean isScreenOrientationPortrait(Context context) { return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT; }/* w w w . j a v a 2s . c om*/ }