public static enum OrientationSensor.ScreenOrientation extends java.lang.Enum<OrientationSensor.ScreenOrientation>
Enum Constant and Description |
---|
LANDSCAPE |
PORTRAIT |
REVERSED_LANDSCAPE |
REVERSED_PORTRAIT |
Modifier and Type | Method and Description |
---|---|
static OrientationSensor.ScreenOrientation |
fromSurfaceOrientation(int surfaceOrientation) |
int |
getRotation() |
static OrientationSensor.ScreenOrientation |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OrientationSensor.ScreenOrientation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OrientationSensor.ScreenOrientation REVERSED_LANDSCAPE
public static final OrientationSensor.ScreenOrientation LANDSCAPE
public static final OrientationSensor.ScreenOrientation PORTRAIT
public static final OrientationSensor.ScreenOrientation REVERSED_PORTRAIT
public static OrientationSensor.ScreenOrientation[] values()
for (OrientationSensor.ScreenOrientation c : OrientationSensor.ScreenOrientation.values()) System.out.println(c);
public static OrientationSensor.ScreenOrientation 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 null@NonNull public static OrientationSensor.ScreenOrientation fromSurfaceOrientation(int surfaceOrientation)
public int getRotation()