OrientationEventListener.OnOrientationChanged(Int32) Method

Definition

Called when the orientation of the device has changed.

[Android.Runtime.Register("onOrientationChanged", "(I)V", "GetOnOrientationChanged_IHandler")]
public abstract void OnOrientationChanged (int orientation);
[<Android.Runtime.Register("onOrientationChanged", "(I)V", "GetOnOrientationChanged_IHandler")>]
abstract member OnOrientationChanged : int -> unit

Parameters

orientation
Int32

The new orientation of the device.

Attributes

Remarks

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.

Java documentation for android.view.OrientationEventListener.onOrientationChanged(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also