List of usage examples for android.content.res Configuration ORIENTATION_LANDSCAPE
int ORIENTATION_LANDSCAPE
To view the source code for android.content.res Configuration ORIENTATION_LANDSCAPE.
Click Source Link
From source file:Main.java
public static boolean isHorizontal(Context context) { return getOrientacao(context) == Configuration.ORIENTATION_LANDSCAPE; }
From source file:Main.java
public static boolean isLandscape(Context context) { return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; }
From source file:Main.java
public static boolean isLandscape(Context context) { Configuration cf = context.getResources().getConfiguration(); return cf.orientation == Configuration.ORIENTATION_LANDSCAPE; }
From source file:Main.java
public static int getOrientation(Context context) { int orientation = 0; if (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { orientation = 2;/* w ww. j ava 2 s . c om*/ } else if (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { orientation = 1; } return orientation; }
From source file:Main.java
public static boolean isLandScape(Context context) { return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; }
From source file:Main.java
public static boolean isLandscape(Context context) { if (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { return true; }// w w w. j av a2s. com return false; }
From source file:Main.java
public static boolean isOrientationLandscape(Context context) { if (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { return true; }//from ww w . j a v a 2 s. c o m return false; }
From source file:Main.java
public static boolean isLandscape(@NonNull Context context) { return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; }
From source file:Main.java
public static boolean isScreenOrientationLandscape(Context context) { return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; }
From source file:Main.java
public static String getOrientation(Context context) { switch (context.getResources().getConfiguration().orientation) { case Configuration.ORIENTATION_LANDSCAPE: return "Landscape"; case Configuration.ORIENTATION_PORTRAIT: return "Portrait"; default://from w w w .j a v a 2 s. c o m return ""; } }