/**
  * Event fired with a warning when the rotation is aborted. In specific, this
  * event may be fired if the application vetoes display rotation before rotation is completed.
  *
  * @param rotationEvent   RotationEvent containing origin, destination and state of the event.
  * @param warning Type of condition that aborted rotation execution.
  * @since v2.0.5
  */
 public void OnWarning(RotationEvent rotationEvent, IDisplayOrientationListenerWarning warning)
 {
     AppRegistryBridge.GetInstance().GetPlatformContextWeb().ExecuteJavaScript("Adaptive.handleDisplayOrientationListenerWarning( '" + GetId() + "', JSON.parse(" + GetJSONProcessor().SerializeObject(rotationEvent) + "), JSON.parse(" + GetJSONProcessor().SerializeObject(warning) + ") )");
 }
Пример #2
0
          /**
             Event fired with the successful start and finish of a rotation.

             @param rotationEvent RotationEvent containing origin, destination and state of the event.
             @since v2.0.5
          */
          public void OnResult(RotationEvent rotationEvent)
          {
               AppRegistryBridge.GetInstance().GetPlatformContextWeb().ExecuteJavaScript("Adaptive.handleDeviceOrientationListenerResult( '"+GetId()+"', JSON.parse(" + GetJSONProcessor().SerializeObject(rotationEvent) +") )");
          }