/// <summary>
        /// Handle DeviceOrientation event
        /// </summary>
        /// <param name="e">An event data</param>
        protected override void OnDeviceOrientationChanged(DeviceOrientationEventArgs e)
        {
            base.OnDeviceOrientationChanged(e);
            var orientation = (DeviceOrientationStatus)e.DeviceOrientation;

            _app.ApplicationInfomation.UpdateDeviceOrientation(orientation);
        }
示例#2
0
        void OnRotationChanged(object s, DeviceOrientationEventArgs e)
        {
            switch (e.DeviceOrientation)
            {
            case DeviceOrientation.Orientation_0:
                displayRotation    = DisplayRotation.Rotation0;
                displayOrientation = GetNaturalDisplayOrientation();
                break;

            case DeviceOrientation.Orientation_90:
                displayRotation    = DisplayRotation.Rotation90;
                displayOrientation = GetNaturalDisplayOrientation() == DisplayOrientation.Portrait ? DisplayOrientation.Landscape : DisplayOrientation.Portrait;
                break;

            case DeviceOrientation.Orientation_180:
                displayRotation    = DisplayRotation.Rotation180;
                displayOrientation = GetNaturalDisplayOrientation();
                break;

            case DeviceOrientation.Orientation_270:
                displayRotation    = DisplayRotation.Rotation270;
                displayOrientation = GetNaturalDisplayOrientation() == DisplayOrientation.Portrait ? DisplayOrientation.Landscape : DisplayOrientation.Portrait;
                break;

            default:
                displayRotation    = DisplayRotation.Unknown;
                displayOrientation = DisplayOrientation.Unknown;
                break;
            }
            OnMainDisplayInfoChanged();
        }
示例#3
0
        protected override void OnDeviceOrientationChanged(DeviceOrientationEventArgs e)
        {
            base.OnDeviceOrientationChanged(e);

            if (!Handle.IsInvalid)
            {
                FlutterRotateWindow(Handle, (int)e.DeviceOrientation);
            }
        }
 protected override void OnDeviceOrientationChanged(DeviceOrientationEventArgs e)
 {
     base.OnDeviceOrientationChanged(e);
 }
示例#5
0
 protected override void OnDeviceOrientationChanged(DeviceOrientationEventArgs e)
 {
     base.OnDeviceOrientationChanged(e);
     Current.Services?.InvokeLifecycleEvents <TizenLifecycle.OnDeviceOrientationChanged>(del => del(this, e));
 }
示例#6
0
 protected override void OnDeviceOrientationChanged(DeviceOrientationEventArgs e)
 {
     // Handle when your app
 }