Mobile Web navigation bar hidden set to true

You must Login before you can answer or comment on any questions.

Hi, I am developing a Titanium application which uses a web view in a window. In that I want to hide the navBar. I tried using 'navBarHidden:true' while creating a window. But it didn`t work. I tried using 'modal:true'. It worked. I mean the navBar is getting hide. In a tableview addEventlistener I am opening this window which consists of webview. The navBar is getting hide. But for the first time the window is not getting painted completely. I am getting some black space below the widnow. If I navigate to some other screen and come back the window is painting completely. I am facing this problem for the first time in mobileweb. This is the code I am trying.

var window= Titanium.UI.createWindow({
    backgroundImage :'none',
    showScrollbars : false,
    navBarHidden : true,
    title : 'WebDemo',
    orientationModes : [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT]            
});


if (Ti.platform.osname === 'mobileweb') {
    window.modal = true;        
}

With this code I am able to hide the navBar. But for the first time i.e., when the window is opened it is not painting completely through out the screen. But for the second time I am not facing this issue. Kindly share a solution ASAP...

Thanks in Advance...

1 Answer

As I mentioned in the other thread, there's no such thing as painting in mobile web. What you are most likely seeing is that the window/view/whatever is not covering the entire screen. Try using a desktop browser debugger to see what the size of the control is at that point in time (right click and select "inspect element" or something similar).

Note that since there is no background image or background color specified in your code, the window will be transparent and you won't be able to see anything anyways (the default background color is black IIRC).

— answered 7 months ago by Bryan Hughes
answer permalink
18 Comments
  • Hi Bryan, As you said window is not covering the entire screen. An that too it happening for the first time. I mean when I open a window it is happening. I am adding some background image to the window. And I am adding some web views to the window. I tried using many ways. But didn`t work. Can you share a possible solution...

    — commented 7 months ago by Prasad M.R.C

  • This code works perfectly fine for me

    Titanium.UI.createWindow({
        backgroundImage :'none',
        showScrollbars : false,
        navBarHidden : true,
        title : 'WebDemo',
        orientationModes : [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT],
        backgroundColor: 'green',
        modal: true
    }).open();

    — commented 7 months ago by Bryan Hughes

  • Hi Bryan, Is it covering the entire screen? I am adding this window to a tab group. If I didn`t add the window to a tab group the window is covering the entire screen. But as per the requirement of my application I need to add the window to a tab group. When I add the window to a tab group it is not covering the entire screen. That I am facing this problem for the first time. Can you share me any solution now ASAP...

    — commented 7 months ago by Prasad M.R.C

  • Show 15 more comments

Your Answer

Think you can help? Login to answer this question!