Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10575] iOS: Disabling/enabling status bar hiding behaviour when fullscreen window opens

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2015-01-27T18:26:18.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsiOS
Labelsapi, dev-invalidate
ReporterHidayet Dogan
AssigneeVishal Duggal
Created2012-08-16T02:21:19.000+0000
Updated2017-03-13T21:17:41.000+0000

Description

It would be nice to have an option to make status bar hidden or not when opening "fullscreen" window. Currently, it automatically hides the status bar. Window can have "hideStatusBar" option to enable or disable this behaviour. For example:
var win = Ti.UI.createWindow({
    fullscreen: true,
    hideStatusBar: false
});

Comments

  1. Hidayet Dogan 2012-08-24

    Made a pull request for this feature. I will update ticket with functional test code soon. See commit at: https://github.com/appcelerator/titanium_mobile/pull/2824
  2. Hidayet Dogan 2012-08-24

    Here is the functional test code:
    Titanium.UI.setBackgroundColor('#fff');
       
       var win = Titanium.UI.createWindow({  
           title: 'Fullscreen Test',
           backgroundColor: '#fff',
           layout: 'vertical'
       });
       
       var win_fullscreen = Titanium.UI.createWindow({
       	title: 'Fullscreen Window',
       	backgroundColor: '#fff',
       	fullscreen: true
       });
       
       var label = Titanium.UI.createLabel({
       	top: 10,
       	text: 'Click window to close.'
       });
       
       win_fullscreen.add(label);
       
       win_fullscreen.addEventListener('click', function(e) {
       	win_fullscreen.close();
       });
       
       var button1 = Titanium.UI.createButton({
       	top: 10,
       	title: 'Open Fullscreen Window Without StatusBar',
       	style: Titanium.UI.iPhone.SystemButtonStyle.BORDERED
       });
       
       button1.addEventListener('click', function(e) {
       	win_fullscreen.open({
       		// statusBarHiddenInFullscreen: false (default is already false)
       	});
       });
       
       win.add(button1);
       
       var button2 = Titanium.UI.createButton({
       	top: 10,
       	title: 'Open Fullscreen Window With StatusBar',
       	style: Titanium.UI.iPhone.SystemButtonStyle.BORDERED
       });
       
       button2.addEventListener('click', function(e) {
       	win_fullscreen.open({
       		statusBarHiddenInFullscreen: true
       	});
       });
       
       win.add(button2);
       
       win.open();
  3. Hidayet Dogan 2012-08-29

    Here is the example code how I use fullscreen windows for HUD views and how I don't want it to hide status bar.
    Titanium.UI.setBackgroundColor('#fff');
       
       var tabGroup = Titanium.UI.createTabGroup();
       
       var win1 = Titanium.UI.createWindow({
       	title: 'First Window',
       	backgroundColor: '#fff',
       	layout: 'vertical'
       });
       
       var label = Titanium.UI.createLabel({
       	top: 10,
       	text: 'This is an example label...'
       });
       
       win1.add(label);
       
       var button = Titanium.UI.createButton({
       	top: 10,
       	title: 'Open loading screen',
       	style: Titanium.UI.iPhone.SystemButtonStyle.BORDERED
       });
       
       button.addEventListener('click', function(e) {
       	/*
       	 * User sould not able to switch tabs or click navigation bar buttons
       	 * until job is finished.
       	 * 
       	 * So I use fullscreen window to cover whole screen including tabGroup and navBar
       	 * to prevent use to switch tabs or click navigation bar buttons (ie, back button).
       	 * Default window or view could not cover tabGroup nor navBar.
       	 */
       	var hud_window = Titanium.UI.createWindow({
       		fullscreen: true,
       		backgroundColor: 'transparent',
       		layout: 'vertical'
       	});
       	
       	var hud_view = Titanium.UI.createView({
       		top: 100,
       		width: 250,
       		height: Ti.UI.SIZE,
       		backgroundColor: '#000',
       		borderRadius: 6,
       		opacity: 0.75
       	});
       	
       	var hud_label = Titanium.UI.createLabel({
       		text: 'Loading...\nYou have to wait 5 seconds to touch tabs or navigation bar.',
       		textAlign: 'center',
       		width: 250,
       		top: 10,
       		color: '#fff'
       	});
       	
       	hud_view.add(hud_label);
       	hud_window.add(hud_view);
       	hud_window.open(); // Now it hides statusbar and UI goes up.
       	
       	setTimeout(function() {
       		hud_window.close(); // Now it shows statusbar and UI goes down.
       	}, 5000);
       });
       
       win1.add(button);
       
       var tab1 = Titanium.UI.createTab({
       	title: 'First Tab',
       	icon: 'KS_nav_ui.png',
       	window: win1
       });
       
       var win2 = Titanium.UI.createWindow({
       	title: 'Second Window',
       	bacgroundColor: '#d00'
       });
       
       var tab2 = Titanium.UI.createTab({
       	title: 'Second Tab',
       	icon: 'KS_nav_views.png',
       	window: win2
       });
       
       tabGroup.addTab(tab1);
       tabGroup.addTab(tab2);
       tabGroup.open();
  4. Lee Morris 2017-03-13

    Closing ticket as the issue will not fix.

JSON Source