is Screen Orientation Portrait - Android android.app

Android examples for android.app:Screen

Description

is Screen Orientation Portrait

Demo Code

import android.content.Context;
import android.content.res.Configuration;

public class Main{


    public static boolean isScreenOrientationPortrait(Context context) {
        return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT;

    }//from   w ww  .java2 s.c o m

}

Related Tutorials