How to hide the soft navigation bar on Android wit

2019-09-19 00:43发布

Please can someone point to an example of how to hide the navigation bar on android, using Appcelerator.

NOT the action bar, nor the title bar. I can make these hide. I want to make a completely fullscreen app, and hide the navigation bar

thanks

3条回答
仙女界的扛把子
2楼-- · 2019-09-19 01:13

What you want is possible since Titanium 5.2 by using <fullscreen>true</fullscreen> in tiapp.xml.

See Hide Soft Navigation Bar in the Release Notes.

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-09-19 01:14

What you are trying to achieve is called immersive fullscreen mode, it is possible to do it from android 4.4, but it seems that Titanium don't support the flag; there is a module that does this thing, haven't personally tried it but probably will do what you need.

查看更多
戒情不戒烟
4楼-- · 2019-09-19 01:21

In the tiapp.xml file:

<fullscreen>true</fullscreen>
<navbar-hidden>true</navbar-hidden>

In the app.tss or index.tss:

'Window':{
    navBarHidden:true,
    tabBarHidden:true,
    fullscreen:true
}

And in the index.js:

$.index.addEventListener("open",function() {

    if(OS_ANDROID) $.index.activity.actionBar.hide();
});
查看更多
登录 后发表回答