is Screen Landscape - Android Phone

Android examples for Phone:Screen

Description

is Screen Landscape

Demo Code


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

public class Main {
    public static final boolean isLandscape(final Context context) {
        final int orientation = context.getResources().getConfiguration().orientation;
        return orientation == Configuration.ORIENTATION_LANDSCAPE;
    }/*www .j a  v  a 2  s  . co m*/
}

Related Tutorials