is Activity LandScape - Android Activity

Android examples for Activity:Activity Orientation

Description

is Activity LandScape

Demo Code


//package com.java2s;

import android.content.Context;

import android.content.res.Configuration;

public class Main {
    public static boolean isLandScape(Context context) {
        return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
    }/*from   w w w  . j a v  a  2 s.c  o m*/
}

Related Tutorials