Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11801] iOS: Window height increases by iPad status bar height when camera or full screen window atop rotates

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-12-06T00:59:00.000+0000
Affected Version/sRelease 2.1.3, Release 2.1.4
Fix Version/sRelease 3.1.0, 2012 Sprint 25, 2012 Sprint 25 API
ComponentsiOS
LabelsSupportTeam, qe-port
ReporterVarun Joshi
AssigneeVishal Duggal
Created2012-11-16T08:34:14.000+0000
Updated2014-06-19T12:42:56.000+0000

Description

Issue

Window increases in height by the height of the iPad status bar (20px) when a "fullscreen" window is opened on top and rotated. It also increases when the camera view is opened and rotated.

Sample Code

{noformat} var win = Ti.UI.createWindow({ top: 0, // <<<<<< With 'top', the bug appears. Comment out 'top', bug doesn't appear. left: 0, right: 0, backgroundColor: 'yellow', bottom: 20 }); var footer = Ti.UI.createView({ bottom: 0, height: 20, width: Ti.UI.FILL, backgroundColor: 'red' }); win.add(footer); var fswBtn = Ti.UI.createButton({ top: 10, left: 10, width: 150, height: 50, title: 'fullscreen window', backgroundColor: 'white', }); win.add(fswBtn); fswBtn.addEventListener('singletap', function() { fullscreenWinTest(); }); var cameraBtn = Ti.UI.createButton({ top: 10, left: 200, width: 150, height: 50, title: 'camera', backgroundColor: 'white', }); win.add(cameraBtn); cameraBtn.addEventListener('singletap', function() { cameraTest(); }); win.open(); function fullscreenWinTest() { var fswin = Ti.UI.createWindow({ fullscreen: true, backgroundColor: 'blue' }); var closeBtn = Ti.UI.createButton({ top: 10, left: 10, width: 150, height: 50, title: 'close', backgroundColor: 'white' }); fswin.add(closeBtn); closeBtn.addEventListener('singletap', function() { fswin.close(); }); fswin.open(); } function cameraTest() { var overlay = Ti.UI.createView(); var closeBtn = Ti.UI.createButton({ top: 10, left: 10, width: 150, height: 50, title: 'close', backgroundColor: 'white' }); overlay.add(closeBtn); closeBtn.addEventListener('singletap', function() { Ti.Media.hideCamera(); }); Ti.Media.showCamera({ overlay: overlay, }); } {noformat}

Steps to Reproduce

1) Start the app 2) Notice the red footer 20 pixels above the ipad simulator's window bottom that is black 3) Rotate the iPad (device or simulator) 4) The 20 pixel height is maintained 5) Tap the "fullscreen window" button 6) Rotate 7) Tap [close] button 8) The 20 pixel height area is gone 9) Rotate again and the 20 pixel height area reappears Same issue also occurs with the camera overlay (code included in the sample)

Comments

  1. Vishal Duggal 2012-12-04

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/3526
  2. Anshu Mittal 2013-01-17

    Tested with: SDK:3.1.0.v20130114171802 Studio:3.0.1.201212181159 Device: iPad2(v5.1), iPad3(v 6.0) Works as expected

JSON Source