You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@OverRide public void onSensorChanged(SensorEvent event)
{
if(mView == null)
return;
loadNewSensorData(event);
// this should not be done on the gui thread
//NME.onDeviceOrientationUpdate(prepareDeviceOrientation());
final int _orientation = prepareDeviceOrientation();
if(orientation != _orientation){
orientation = _orientation;
mView.queueEvent(new Runnable(){
public void run(){
if(mView != null)
mView.HandleResult(NME.onDeviceOrientationUpdate(_orientation));
}
});
}
}
Works well for me. Would be great implement related event: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/StageOrientationEvent.html
This could help with preventing stage orientation changing when we need:
"The orientationChanging (StageOrientationEvent.ORIENTATION_CHANGING), is dispatched before the screen changes to a new orientation. Calling the preventDefault() method of the event object dispatched for orientationChanging prevents the stage from changing orientation."
No description provided.
The text was updated successfully, but these errors were encountered: