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