[TIMOB-4121] Android: Orientation Change Doesn't Fire from Outside Tab Group
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-08-15T08:17:01.000+0000 |
| Affected Version/s | Release 1.7.0 |
| Fix Version/s | Release 1.7.2 |
| Components | Android |
| Labels | n/a |
| Reporter | Dawson Toth |
| Assignee | Shak Hossain |
| Created | 2011-05-17T11:00:00.000+0000 |
| Updated | 2012-02-10T00:50:30.000+0000 |
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(); });please confirm this is still a bug in 1.7.2
Associated Helpdesk Tickets
[VRM-23287-385](http://appc.me/c/VRM-23287-385)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.