Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5864] iOS: TabGroup is incorrectly resized when the device orientation changes

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2014-09-17T19:06:17.000+0000
Affected Version/sRelease 1.7.3, Release 1.8.0
Fix Version/sRelease 3.2.0, Release 3.4.0, Release 3.5.0
ComponentsiOS
Labelsorientation, qe-3.4.0, qe-closed-3.2.3, qe-testadded, tabgroup, tabs, tbs-1.9.0
ReporterFrancisco Antonio Duran Ramirez
AssigneeVishal Duggal
Created2011-10-26T07:11:50.000+0000
Updated2014-11-21T20:32:04.000+0000

Description

Problem

TabGroup is wrongly resized when the orientation is changed.

Reproducible steps:

1.Run the code below. 2.Press tab 2.

Behavior:

The tab 2 is not showed with the correct size. Tab 1 covers 75% of the screen width and Tab2 covers 25% of the screen width

Expected behavior

Customer wants to have the TabGroups with a correct size. The expectation is to have 50% of the screen width for each tab.

Sample Code:

var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
  orientationModes: [Titanium.UI.LANDSCAPE_LEFT]
});
var tab1 = Titanium.UI.createTab({  
    title:'Tab 1',
    window:win1
});

var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
  orientationModes: [Titanium.UI.PORTRAIT]
});
var tab2 = Titanium.UI.createTab({  
    title:'Tab 2',
    window:win2
});

tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);

tabGroup.open();

Helpdesk

APP-196512

Attachments

FileDateSize
iOS7.PNG2014-09-09T06:51:28.000+000026213
iOS8.PNG2014-09-09T06:51:28.000+000021415
rotate_to_portrait_from_landscape_tab2.png2014-09-18T18:47:54.000+000029017
Screen Shot 2011-10-26 at 9.41.53 AM.png2011-10-26T07:11:50.000+0000119853
tab1_landscape.png2014-09-18T18:47:54.000+000024683
tab2_pressed_in_landscape.png2014-09-18T18:47:54.000+000023458
tiapp.xml2011-10-26T11:07:33.000+00001557

Comments

  1. Reggie Seagraves 2011-10-26

    I am unable to reproduce this issue with the materials provided in the ticket. Please attach the tiapp.xml used for this project. The application run with the javascript from this ticket shows the tabs properly taking 50% of the screen width each, but does not ever rotate to portrait mode.
  2. Reggie Seagraves 2011-10-26

    After further review, this is indeed a problem and has been scheduled and assigned.
  3. Reggie Seagraves 2011-10-26

    As a timely workaround to the reported issue, the client should put the supported orientation modes on the tab group, not the windows in the tab group. This will present a UI supported by Apple's HIG, and works fine with our current SDK.
  4. Shak Hossain 2014-02-11

    This issue can't be reproduced with TISDK 3.2 or higher. Therefore, marking it as resolved.
  5. Paras Mishra 2014-03-12

    TabGroup is resizing correctly having two tabs, each with 50% width. Verified the fix using: Device : iPhone 5s , iOS version : 7.1 SDK: 3.2.3.v20140311115447 CLI version : 3.2.1 OS : MAC OSX 10.9 Alloy: 1.3.1 ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.2.2.201403061827 titanium-code-processor: 1.1.0 XCode : 5.1 Beta 5
  6. Dhirendra Jha 2014-09-09

    This issue is reproducible on iOS8 device, working fine on iOS7 device. See the attached screen shots. Hence reopening this issue using below environment - Appcelerator Studio:3.4.0.201409032106 Sdk:3.4.0.v20140908164913 alloy:1.5.0-beta2 titanium:3.4.0-beta titanium-code-processor:1.1.1 acs:1.0.16 npm:1.3.2 OS:Maverick(10.9.4) xcode: Xcode6Beta6 Device:iPhone5s(v8.0), iPhone5(v7.1.2)
  7. Ingo Muschenetz 2014-09-12

    Known issue with forced orientations for 3.4.0. We may deprecate forced orientations, or provide a small fix in 3.4.1.
  8. Olga Romero 2014-09-18

    Added screenshots with a different behavior with Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409161950 Titanium SDK, build: 3.4.0.v20140917120000 acs@1.0.16 alloy 1.5.0-rc2 install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0-rc4 titanium-code-processor@1.1.1 Xcode6.0.1 (6A317) Devices: iPhone 5S iOS8

    Steps to reproduce

    1. Run the app 2. Click Tab2 from Landscape mode 3. Rotate the device

JSON Source