[AC-825] iOS: OptionDialog unhides the StatusBar in Full-screen Modal NavigationWindow...
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-07-14T22:34:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | OptionDialog, fullscreen, ios, navbar, navigationWindow, statusbar |
Reporter | Ed |
Assignee | Mauro Parra-Miranda |
Created | 2014-06-11T03:06:30.000+0000 |
Updated | 2016-03-08T07:37:06.000+0000 |
Description
Problem:
Using an OptionDialog inside a full-screen, modal navigation window enables (shows) the status bar.
Expected:
Use of an OptionsDialog should have no effect on the full-screen status of a window, and should not unhide the status bar when loaded.
Test case:
Load the code below. Tap "Open Full-Screen Modal" to load a modal navigation window. Notice the status bar is not shown (which is correct).
Tap "Open Details Window" to go to a sub-navigation window. The status bar is still hidden as intended.
Now Tap "Open Options" and as soon as the options dialog shows, the status bar appears. The navigation bar is now "under" the status bar.
Tap "Cancel" and then tap "< WIN 2" to go back to the previous window. The status bar still shows, and the misalignment of the window and navigation bar is present by the black background color showing through.
app.js
var win1 = Ti.UI.createWindow({
title: 'WIN 1',
backgroundColor: '#ffffff'
});
var win2 = Ti.UI.createWindow({
title: 'WIN 2',
fullscreen: true,
backgroundColor: '#f2f2f2'
});
var win3 = Ti.UI.createWindow({
title: 'WIN 3',
backgroundColor: '#cdcdcd'
});
var nav = Ti.UI.iOS.createNavigationWindow({
window: win2
});
var openModal = Ti.UI.createButton({
title: 'Open Full-Screen Modal'
});
openModal.addEventListener('click', function(e) {
nav.open({
modal: true
,modalTransitionStyle: Ti.UI.iPhone.MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL
,modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FULLSCREEN
,fullscreen: true
});
});
win1.add(openModal);
var openDet = Ti.UI.createButton({
title: 'Open Details Window'
});
openDet.addEventListener('click', function(e) {
nav.openWindow(win3);
});
var lbl = Ti.UI.createLabel({
top: 100,
text: 'Notice StatusBar still shows and there is an alignment issue with the nav bar.',
visible: false
});
win2.add(lbl);
win2.add(openDet);
var action = Ti.UI.createButton({
title: 'Open Options (Notice StatusBar Appears Above)',
font: {fontSize: 14}
});
action.addEventListener('click', function(e) {
lbl.visible = true;
Ti.UI.createOptionDialog({
options: [ 'Hit Cancel and', 'go back to WIN 2', 'CANCEL' ],
cancel: 2
}).show();
});
win3.add(action);
win1.open();
Hi, Thank you for your case. Your OptionDialog is created on win 3, if you want keep the window full-screen, you have to set win 3 as full screen, because the default OptionDialog setting for IOS will show the status if you don't set win 3 as full screen. Regard, Shuo