[AC-5764] Android: Ti.Gesture orientationchange event keeps on firing
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Needs more info |
Resolution Date | 2018-06-12T10:09:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, orientationChange |
Reporter | Michiel van Eerd |
Assignee | Shak Hossain |
Created | 2018-06-07T10:20:34.000+0000 |
Updated | 2018-06-12T10:09:21.000+0000 |
Description
When executing the following code, the onOrientationChange function keeps on executing infinitely.
<Alloy>
<Window>
<Label>Hello, World</Label>
</Window>
</Alloy>
$.index.open();
Ti.Gesture.addEventListener("orientationchange", onOrientationChange);
function onOrientationChange(e) {
console.log(e.orientation);
}
Response is something like:
[INFO] 6
[INFO] 4
[INFO] 1
[INFO] 3
[INFO] 1
[INFO] 6
[INFO] 1
[INFO] 3
[INFO] 1
[INFO] 3
etc...
Hello, I have tested your issue on Android 8 device. I wasn't able to reproduce the issue. The onOrientationChange function only fires on when the device orientation is changed, not continuously. Thanks.
Thanks, I can also see that it's working okay on my device, but on the Android emulator it's firing very fast infinitely.
Hello, I also tested on emulator and find it's also ok in there. Can you share a video demonstration of the issue? Thanks.
Hello, Can you please share a video to demonstrate of the issue? It would be helpful for better investigation. Thanks