Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-825

iOS: OptionDialog unhides the StatusBar in Full-screen Modal NavigationWindow...

    Details

      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();
      

        Attachments

          Activity

            People

            • Assignee:
              mpmiranda Mauro Parra-Miranda
              Reporter:
              bcproductions Ed
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code