IT. Expert System.

Android Reference

OrientationEventListener


android.view

Class OrientationEventListener



  • public abstract class OrientationEventListener
    extends Object
    Helper class for receiving notifications from the SensorManager when the orientation of the device has changed.
    • Field Detail

      • ORIENTATION_UNKNOWN

        public static final int ORIENTATION_UNKNOWN
        Returned from onOrientationChanged when the device orientation cannot be determined (typically when the device is in a close to flat position).
        See Also:
        onOrientationChanged(int), Constant Field Values
    • Constructor Detail

      • OrientationEventListener

        public OrientationEventListener(Context context)
        Creates a new OrientationEventListener.
        Parameters:
        context - for the OrientationEventListener.
      • OrientationEventListener

        public OrientationEventListener(Context context,
                                int rate)
        Creates a new OrientationEventListener.
        Parameters:
        context - for the OrientationEventListener.
        rate - at which sensor events are processed (see also SensorManager). Use the default value of SENSOR_DELAY_NORMAL for simple screen orientation change detection.
    • Method Detail

      • enable

        public void enable()
        Enables the OrientationEventListener so it will monitor the sensor and call onOrientationChanged(int) when the device orientation changes.
      • disable

        public void disable()
        Disables the OrientationEventListener.
      • canDetectOrientation

        public boolean canDetectOrientation()
      • onOrientationChanged

        public abstract void onOrientationChanged(int orientation)
        Called when the orientation of the device has changed. orientation parameter is in degrees, ranging from 0 to 359. orientation is 0 degrees when the device is oriented in its natural position, 90 degrees when its left side is at the top, 180 degrees when it is upside down, and 270 degrees when its right side is to the top. ORIENTATION_UNKNOWN is returned when the device is close to flat and the orientation cannot be determined.
        Parameters:
        orientation - The new orientation of the device.
        See Also:
        ORIENTATION_UNKNOWN


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 181 / 159412764. Delta: 0.03898 с