public class OrientationSensor
extends android.view.OrientationEventListener
| Modifier and Type | Class and Description |
|---|---|
static interface |
OrientationSensor.OrientationListener |
static class |
OrientationSensor.ScreenOrientation |
| Constructor and Description |
|---|
OrientationSensor(android.content.Context context,
int rate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(OrientationSensor.OrientationListener listener) |
void |
clearListener() |
static int |
getDeviceDefaultOrientation() |
static OrientationSensor |
getInstance() |
static OrientationSensor.ScreenOrientation |
getScreenOrientation() |
OrientationSensor.ScreenOrientation |
getSystemOrientation() |
boolean |
hasFixedOrientation() |
static void |
initSensor(android.content.Context context) |
static boolean |
isScreenPortrait() |
void |
onOrientationChanged(int angle) |
void |
removeListener(OrientationSensor.OrientationListener listener) |
void |
start(boolean forceRotation) |
void |
stop() |
public OrientationSensor(android.content.Context context,
int rate)
public static int getDeviceDefaultOrientation()
public static void initSensor(android.content.Context context)
public void start(boolean forceRotation)
public void stop()
public static OrientationSensor getInstance()
public OrientationSensor.ScreenOrientation getSystemOrientation()
public boolean hasFixedOrientation()
public void onOrientationChanged(int angle)
onOrientationChanged in class android.view.OrientationEventListenerpublic void addListener(OrientationSensor.OrientationListener listener)
public void removeListener(OrientationSensor.OrientationListener listener)
public void clearListener()
public static OrientationSensor.ScreenOrientation getScreenOrientation()
public static boolean isScreenPortrait()