Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18247] Ti.Gesture.Orientation does not update when listener is added and removed in Landscape/Portrait

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsTiAPI
LabelsTi.Gesture.Orientation, android, api
ReporterGabriel Mario Aguirre
AssigneeUnknown
Created2014-12-15T17:08:46.000+0000
Updated2018-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

FileDateSize
orientationExample.js2014-12-16T17:52:13.000+00001037

Comments

  1. Shuo Liang 2014-12-16

    Hi, Please provide a simple test case to reproduce your problem, that will be really helpful to address it. Thanks Regards, Shuo
  2. Gabriel Mario Aguirre 2014-12-16

    (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.
  3. Gabriel Mario Aguirre 2015-01-06

    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.
  4. Gabriel Mario Aguirre 2015-03-03

    Any updates on this issue? I would consider it a large issue.

JSON Source