Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6390] iOS: Navbar is resized wrong when the orientation is changed

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2011-12-07T12:13:56.000+0000
Affected Version/sRelease 1.7.6
Fix Version/sSprint 2011-49
ComponentsiOS
Labelsmerge-1.7.6
ReporterFrancisco Antonio Duran Ramirez
AssigneeStephen Tramer
Created2011-11-30T13:58:52.000+0000
Updated2017-03-21T22:44:41.000+0000

Description

Problem

Navbar is resized wrong when the orientation is changed.

Reproducible steps:

1. Run the code below 2. Hold the device in landscape 3. Click on a row.Child window will open. 4. Turn the device to portrait mode. Notice that Navbar height is reduced and you'll see some black area between the Navbar, and the table view.

Expected behavior:

Customer wants to have the right size of the NavBar without black area between the Navbar, and the table view.

Tested with the next specs:

iPhone 3G Version: 4.3.5 Simulator iOS version on simulator: 5.0 Titanium Studio, build: 1.0.7.201111231202 Titanium SDK: 1.7.6.v20111122141108

More info:

Customer knows that the code works good with the next CI Build: 1.8.0.1.v20111129200258 , but he wants to use 1.7.6. See the video attached.

Sample code:

var modal = Ti.UI.createWindow({
  navBarHidden:true
});

var modalWin = Ti.UI.createWindow({
  backgroundColor:"red",
  title: "Karol",
  navBarHidden: true
});

var nav = Ti.UI.iPhone.createNavigationGroup({
  window:modalWin
});

var table = Ti.UI.createTableView({
  style:Ti.UI.iPhone.TableViewStyle.GROUPED,
  data:[{title:"Well look at this"},{title:"TweetDeck is cool"}]
});
modalWin.add(table);

table.addEventListener('click',function(e)
{
  var b = Titanium.UI.createButton({
    title:'Back (no anim)',
    style:Titanium.UI.iPhone.SystemButtonStyle.BORDERED
  });
  b.addEventListener('click', function() {
    nav.close(w,{animated:false});
  });
  var w = Ti.UI.createWindow({
    title:e.rowData.title,
    rightNavButton:b,
    navBarHidden: false,
    backgroundColor:'#e7e7e7'
  });
  
  var table = Ti.UI.createTableView({
  	top:0,
  	scrollable:false,
  style:Ti.UI.iPhone.TableViewStyle.GROUPED,
  data:[{title:"Well look at this"},{title:"TweetDeck is cool"}]
});

w.add(table);
  w.addEventListener('focus',function()
  {
    Ti.API.info("nav group window -- focus event");
  });
  w.addEventListener('blur',function()
  {
    Ti.API.info("nav group window -- blur event");
  });
  var b = Ti.UI.createButton({
    title:"Close Nav",
    width:120,
    height:40
  });
  b.addEventListener('click',function()
  {
    modal.close();
  });
  w.add(b);
  nav.open(w,{modal:true,animated:true});
});

modal.add(nav);
modal.open({modal:true});

Helpdesk

APP-214224

Attachments

FileDateSize
Navbar is resized wrong when the orientation is changed.mov2011-11-30T13:58:52.000+00001327802

Comments

  1. Stephen Tramer 2011-12-06

    Bisect identified the bad commit as 8cc4b84da8da4086c746ee9eab1dcc1280bc1abe - a cherry-pick from 1.8 into 1.7, the fix for TIMOB-4741. Going to check that commit to see if the problem persisted there as well, or if it was built on top of 1.8 changes that prevented the issue from re-appearing there.
  2. Stephen Tramer 2011-12-06

    Bug did indeed persist at 1583a40. Running a second bisect to determine where it was fixed.
  3. Stephen Tramer 2011-12-07

    Bug was fixed by commit 4b14dc58393da3593d76a6a4df6f2c8cfb3fe73b which resolved TIMOB-5833.
  4. Stephen Tramer 2011-12-07

    This is a duplicate of TIMOB-5833; that ticket will have its fix-version updated.
  5. Lee Morris 2017-03-21

    Closing ticket as duplicate with reference to the above comments.

JSON Source