0
votes

I am creating application in Appcelerator Titanium. I want to make it completely full-screen but I cannot hide the navigation bar (back, home buttons). I did everything according to information in Internet but it isn't working.

in tiapp.xml:

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


/*** ........ ***/


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

Window is created like this:

myApp.window = Ti.UI.createWindow({
    backgroundColor: 'white',
    theme: "Theme.AppCompat.NoTitleBar"
});

or like this:

myApp.window = Ti.UI.createWindow({
    backgroundColor: 'white',
    theme: "Theme.AppCompat.Translucent.NoTitleBar"
});

Navigation bar is still visible. What am I missing?

2
i'm just throwing this out there, but did you clean your project ?, i find it a must to clean when ever i modify in the tiapp.xml - TheFuquan

2 Answers

0
votes

Add this to tss to hide the navbar on android

"Window[platform=android]": {
    theme: "Theme.AppCompat.NoTitleBar"
}
0
votes

Your source code looks like you're using Titanium Classic. What you may try is following:

if (Ti.Platform.name == 'android') {
    var theActionBar = null;

    myApp.window.addEventListener("open", function () {
        theActionBar = self.activity.actionBar;
        if (theActionBar != undefined) {
            theActionBar.hide();
        }
    });
}

What this does is adding a listener to the window open event. If the windows open() is called it looks for the android actionBar and removes it. Just use this code beneath your window declaration.

Hope this helps. Greetings Dom