Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1294] Android: query of orientation property should show current orientation.

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-08-14T15:16:12.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0
ComponentsAndroid
Labelsandroid, defect, module_orientation, qe-testadded
ReporterDon Thorp
AssigneeNeeraj Gupta
Created2011-04-15T02:48:44.000+0000
Updated2013-07-15T09:01:40.000+0000

Description

Comments

  1. Junaid Younus 2012-08-14

    Not sure if I understand the issue here correctly, but here is some sample code that I came up with:
       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(); 
       
    Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120814103312, seems to work as documented. Closing ticket.
  2. Evgenii Tcarev 2012-08-17

    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)

JSON Source