public interface DeviceDirectionSource
Modifier and Type | Interface and Description |
---|---|
static interface |
DeviceDirectionSource.DirectionListener
The interface for listening to changes to the device's angle.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isDirectionAvailable()
Returns whether the device direction is available.
|
void |
setDirectionListener(DeviceDirectionSource.DirectionListener listener)
Sets the listener to receive notifications when the device's direction changes.
|
void |
setTargetDisplay(Display targetDisplay)
Sets the display relative to whose orientation the angle is returned.
|
void setTargetDisplay(Display targetDisplay)
null
value indicates the device's "natural" orientation.boolean isDirectionAvailable()
false
, if, for
example, the device lacks the hardware sensors needed to determine direction.void setDirectionListener(DeviceDirectionSource.DirectionListener listener)
null
value to remove a previously set listener.