is Portrait - Android User Interface

Android examples for User Interface:Screen Orientation

Description

is Portrait

Demo Code


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

import android.content.res.Configuration;

public class Main {
    public static boolean isPortrait(Context cxt) {
        return cxt.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT;
    }/*from w ww  .ja va2s .  co m*/
}

Related Tutorials