JavaScript is disabled on your browser.
Enum Constant Summary
Enum Constants
Device is in landscape mode and buttons are left of screen
Device is in landscape mode and buttons are right of screen
Device is in portrait mode and buttons are below screen
Device is in portrait mode and buttons are above screen
Device is lying on the table
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
int
boolean
boolean
Returns orientation obtained by rotating current orientation by 180 degrees.
Returns orientation obtained by rotating current orientation by 90 degrees clockwise.
Returns orientation obtained by rotating current orientation by 90 degrees counter-clockwise.
Returns the enum constant of this class with the specified name.
Returns an array containing the constants of this enum class, in
the order they are declared.
Enum Constant Details
ORIENTATION_PORTRAIT
Device is in portrait mode and buttons are below screen
ORIENTATION_LANDSCAPE_RIGHT
public static final Orientation ORIENTATION_LANDSCAPE_RIGHT
Device is in landscape mode and buttons are right of screen
ORIENTATION_PORTRAIT_UPSIDE
public static final Orientation ORIENTATION_PORTRAIT_UPSIDE
Device is in portrait mode and buttons are above screen
ORIENTATION_LANDSCAPE_LEFT
public static final Orientation ORIENTATION_LANDSCAPE_LEFT
Device is in landscape mode and buttons are left of screen
ORIENTATION_UNKNOWN
Device is lying on the table
Method Details
values
Returns an array containing the constants of this enum class, in
the order they are declared.
Returns:
an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this class. (Extraneous whitespace characters are
not permitted.)
Parameters:
name
- the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException
- if this enum class has no constant with the specified name
NullPointerException
- if the argument is null
intValue
public int intValue ()
isVertical
public boolean isVertical ()
Returns:
true if this orientation is vertical (portrait or inverse
portrai)
isHorizontal
public boolean isHorizontal ()
Returns:
true if this orientation is horizontal (landscape)
rotate90Clockwise
Returns orientation obtained by rotating current orientation by 90 degrees clockwise.
Returns:
orientation obtained by rotating current orientation by 90 degrees clockwise.
rotate90CounterClockwise
Returns orientation obtained by rotating current orientation by 90 degrees counter-clockwise.
Returns:
orientation obtained by rotating current orientation by 90 degrees counter-clockwise.
rotate180
Returns orientation obtained by rotating current orientation by 180 degrees.
Returns:
orientation obtained by rotating current orientation by 180 degrees.
fromActivityInfoCode
@NonNull
public static Orientation fromActivityInfoCode (int value)