Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4121] Android: Orientation Change Doesn't Fire from Outside Tab Group

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-08-15T08:17:01.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sRelease 1.7.2
ComponentsAndroid
Labelsn/a
ReporterDawson Toth
AssigneeShak Hossain
Created2011-05-17T11:00:00.000+0000
Updated2012-02-10T00:50:30.000+0000

Description

Comments

  1. Dawson Toth 2011-05-24

    Workaround

    If you place the orientation code listener inside of each window, it will fire properly. (You could also fire a global event from the below sub.js's orientation change event to get back to having code in the app.js handle the orientation changes.)
       var tabGroup = Ti.UI.createTabGroup();
       tabGroup.addTab(Ti.UI.createTab({
           title: 'Tab 1',
           window: Ti.UI.createWindow({ backgroundColor: 'red', url: 'sub.js' })
       }));
       tabGroup.addTab(Ti.UI.createTab({
           title: 'Tab 2',
           window: Ti.UI.createWindow({ backgroundColor: 'blue', url: 'sub.js' })
       }));
       tabGroup.open();
       
       Ti.Gesture.addEventListener('orientationchange', function(e) {
           Ti.UI.createAlertDialog({
               message: e.orientation
           }).show();
       });
       
  2. Kincy Clark 2011-08-09

    please confirm this is still a bug in 1.7.2
  3. Dawson Toth 2011-08-09

    Associated Helpdesk Tickets

    [VRM-23287-385](http://appc.me/c/VRM-23287-385)
  4. Dawson Toth 2011-08-15

    Just tested with 1.7.2 on my Android Epic 4G running Android 2.2, and it works. I also verified that it was broken in 1.7.1.

JSON Source