How to hide the soft navigation bar on Android with Titanium?

时光总嘲笑我的痴心妄想 提交于 2019-12-12 03:39:59

问题


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


回答1:


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.




回答2:


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



回答3:


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.



来源:https://stackoverflow.com/questions/35888880/how-to-hide-the-soft-navigation-bar-on-android-with-titanium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!