is Screen Orientation Landscape - Android User Interface

Android examples for User Interface:Screen Orientation

Description

is Screen Orientation Landscape

Demo Code


//package com.java2s;
import android.content.Context;
import android.content.res.Configuration;

public class Main {

    public static boolean isScreenOrientationLandscape(Context context) {

        return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;

    }//from  w ww .ja  v  a 2  s  . co  m
}

Related Tutorials