is Screen Orientation Landscape - Android android.app

Android examples for android.app:Screen

Description

is Screen Orientation Landscape

Demo Code

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  a2 s.co  m*/

}

Related Tutorials