Appcelerator - Android : hide status bar and navigation bar

时间:2018-07-19 09:01:23

标签: android titanium appcelerator

I think i tried thousands of combinations, but after hours and hours i did not get any results. I'm trying to hide the STATUS BAR and the NAVIGATION BAR.

This is the actual result (only the splashscreen is ok) :

enter image description here时,将+1添加到willWatch enter image description here

我读了几张票/问题。

我尝试过的解决方案

app.js

win.fullscreen = true / false;
win.navBarHidden = true / false; 

tiapp.xml

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

tiapp.xml(第<android xmlns:android="http://schemas.android.com/apk/res/android">节)

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <application android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar.Fullscreen"/>
    </manifest>
</android>

1 个答案:

答案 0 :(得分:3)

您可以在窗口级别使用一些内置主题来隐藏Android上的导航/状态栏。

https://wiki.appcelerator.org/display/guides2/Android+Themes

所以..您可以这样设置(经典):

var win = Ti.UI.createWindow({
    theme: "Theme.AppCompat.Translucent.NoTitleBar.Fullscreen"
});

在Alloy中,您可以通过在app.tss中进行设置来轻松地进行全局设置:

'Window': {
     theme: "Theme.AppCompat.Translucent.NoTitleBar.Fullscreen"
}