[TIMOB-18247] Ti.Gesture.Orientation does not update when listener is added and removed in Landscape/Portrait
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | TiAPI |
Labels | Ti.Gesture.Orientation, android, api |
Reporter | Gabriel Mario Aguirre |
Assignee | Unknown |
Created | 2014-12-15T17:08:46.000+0000 |
Updated | 2018-02-28T19:55:07.000+0000 |
Description
Add an orientation event listener. Rotate to Landscape, remove the event listener. Rotate back to portrait and add the listener. Rotate to Landscape, the gesture is not detected. This behavior is fixed if an app-wide orientation listener is added in another file and persists throughout the app's lifetime. Only occurs on Android, not on iOS.
Attachments
Hi, Please provide a simple test case to reproduce your problem, that will be really helpful to address it. Thanks Regards, Shuo
(UPDATE: you will need to add the correct button add statements view.add(button2), view.add(button1) , sorry I forgot that) I have attached a simple guide to the problem. The steps to take are: 1. Load the app in Portrait and add the event listener for orientation change 2. Rotate the phone to Landscape 3. Press the "Remove Listener" button to remove the listener 4. Rotate back to portrait 5. Add the event listener again. 6. Rotate to Landscape, observe that the orientation change is not picked up.
I have been running into a simpler case now. When I compile the application, immediately rotate to Landscape from Portrait and add the event listener, the inital rotation back to Portrait is ignored. This renders anything to do with orientation useless for my application. And update would be greatly appreciated.
Any updates on this issue? I would consider it a large issue.