public final class Orientation
extends java.lang.Enum
Modifier and Type | Field and Description |
---|---|
static Orientation |
ORIENTATION_LANDSCAPE_LEFT
Device is in landscape mode and buttons are left of screen
|
static Orientation |
ORIENTATION_LANDSCAPE_RIGHT
Device is in landscape mode and buttons are right of screen
|
static Orientation |
ORIENTATION_PORTRAIT
Device is in portrait mode and buttons are below screen
|
static Orientation |
ORIENTATION_PORTRAIT_UPSIDE
Device is in portrait mode and buttons are above screen
|
static Orientation |
ORIENTATION_UNKNOWN
Device is lying on the table
|
Modifier and Type | Method and Description |
---|---|
static Orientation |
fromActivityInfoCode(int value) |
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) |
static Orientation[] |
values() |
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()
public static Orientation valueOf(java.lang.String name)
public int intValue()
public boolean isVertical()
public boolean isHorizontal()
@NonNull public Orientation rotate90Clockwise()
@NonNull public Orientation rotate90CounterClockwise()
@NonNull public Orientation rotate180()
@NonNull public java.lang.String toString()
toString
in class java.lang.Enum
@NonNull public static Orientation fromInt(int value)
@NonNull public static Orientation fromActivityInfoCode(int value)