public enum Orientation extends java.lang.Enum<Orientation>
| Enum Constant and Description |
|---|
ORIENTATION_LANDSCAPE_LEFT
Device is in landscape mode and buttons are left of screen
|
ORIENTATION_LANDSCAPE_RIGHT
Device is in landscape mode and buttons are right of screen
|
ORIENTATION_PORTRAIT
Device is in portrait mode and buttons are below screen
|
ORIENTATION_PORTRAIT_UPSIDE
Device is in portrait mode and buttons are above screen
|
ORIENTATION_UNKNOWN
Device is lying on the table
|
| Modifier and Type | Method and Description |
|---|---|
static Orientation |
fromInt(int value) |
int |
intValue() |
boolean |
isHorizontal() |
boolean |
isVertical() |
Orientation |
rotate180()
Returns orientation obtained by rotating current orientation by 180 degrees.
|
Orientation |
rotate90Clockwise()
Returns orientation obtained by rotating current orientation by 90 degrees clockwise.
|
Orientation |
rotate90CounterClockwise()
Returns orientation obtained by rotating current orientation by 90 degrees counter-clockwise.
|
java.lang.String |
toString() |
static Orientation |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Orientation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Orientation ORIENTATION_PORTRAIT
public static final Orientation ORIENTATION_LANDSCAPE_RIGHT
public static final Orientation ORIENTATION_PORTRAIT_UPSIDE
public static final Orientation ORIENTATION_LANDSCAPE_LEFT
public static final Orientation ORIENTATION_UNKNOWN
public static Orientation[] values()
for (Orientation c : Orientation.values()) System.out.println(c);
public static Orientation valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int intValue()
public boolean isVertical()
public boolean isHorizontal()
public Orientation rotate90Clockwise()
public Orientation rotate90CounterClockwise()
public Orientation rotate180()
public java.lang.String toString()
toString in class java.lang.Enum<Orientation>public static Orientation fromInt(int value)