The Problem:
When the window changes orientation, if it's modal, it's children end up behind the nav bar.
Code Sample:
var win = Ti.UI.createWindow({
orientationModes:[
Titanium.UI.PORTRAIT,
Titanium.UI.UPSIDE_PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
]
});
var view = Ti.UI.createView({
backgroundColor:'white'
});
var label = Ti.UI.createLabel({
top:0,
height:10,
text:'lalalalala'
});
view.add(label);
win.add(view);
win.open({modal:true});
To Reproduce:
Run the code above in app.js and rotate the device/simulator
Behavior:
- What happens: View with the label with text "lalalala" ends up under the navbar and invisible to the user
- What has to happen: View containing the label has to resize accordingly
*NOTE:* Only check this for correct orienting. There is a bug related to this test, TIMOB-7854, which covers closing and reopening a window over a modal. Any fix for this also needs to pass the "sandwich test" (where the modal is "sandwiched" between two normal windows):
Linked to possible regressions.
Closing bug. Verified fix on: SDK build: 2.0.0.v20120315140247 Titanium Studio, build: 2.0.0.201203142055 xcode: 4.2 Device: iphone 4s (5.0.1)
Also, only tested the *Code Sample* for correct orientation.
No regression occurred when testing TIMOB-4619, TIMOB-1634, TIMOB-6551, TIMOB-6391 on: SDK build: 2.0.0.v20120315140247 Titanium Studio, build: 2.0.0.201203142055 xcode: 4.2 Device: iphone 4s (5.0.1), ipad2 (4.3.5)
Open to update label