[TIMOB-1294] Android: query of orientation property should show current orientation.
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-08-14T15:16:12.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 3.0.0 |
| Components | Android |
| Labels | android, defect, module_orientation, qe-testadded |
| Reporter | Don Thorp |
| Assignee | Neeraj Gupta |
| Created | 2011-04-15T02:48:44.000+0000 |
| Updated | 2013-07-15T09:01:40.000+0000 |
Not sure if I understand the issue here correctly, but here is some sample code that I came up with:
Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120814103312, seems to work as documented. Closing ticket.var win = Ti.UI.createWindow({ backgroundColor : 'white', orientationModes: [Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT] }); var label = Ti.UI.createLabel({ text: 'Null' }); var button = Ti.UI.createButton({ title: 'Query orientation', top: 20, width: 150, height: 70 }); button.addEventListener('click', function(e) { label.text = Ti.Gesture.orientation; }); win.add(button); win.add(label); win.open();Verified fixed with: Titanium Studio, build: 2.1.1.201207271312 SDK version: 2.2.0.v20120817115712 SDK version: 2.1.2.v20120816171609 Devices: Samsung Galaxy Nexus (4.0.4) Motorola DROID3 (2.3.4)