public final class

AccelerometerListener

extends Object
java.lang.Object
   ↳ com.android.phone.AccelerometerListener

Class Overview

This class is used to listen to the accelerometer to monitor the orientation of the phone. The client of this class is notified when the orientation changes between horizontal and vertical.

Summary

Nested Classes
interface AccelerometerListener.OrientationListener  
Constants
int ORIENTATION_HORIZONTAL
int ORIENTATION_UNKNOWN
int ORIENTATION_VERTICAL
Public Constructors
AccelerometerListener(Context context, AccelerometerListener.OrientationListener listener)
Public Methods
void enable(boolean enable)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ORIENTATION_HORIZONTAL

Constant Value: 2 (0x00000002)

public static final int ORIENTATION_UNKNOWN

Constant Value: 0 (0x00000000)

public static final int ORIENTATION_VERTICAL

Constant Value: 1 (0x00000001)

Public Constructors

public AccelerometerListener (Context context, AccelerometerListener.OrientationListener listener)

Public Methods

public void enable (boolean enable)