Can't Hide the Title Titanium with Alloy

I am facing an issue in Titanium Appcelerator using Alloy MVC. This issue contains the following (see image)

enter image description here

I am unable to remove the black bar where the application name and logo is found. I run an app on a device (Google Nexus, no simulator)

I tried the following:

XML:

<Alloy>
    <Window>
    </Window>
</Alloy>

      

TSS:

"Window":
{
    navBarHidden:true,
    fullscreen:true,
    backgroundColor:"Orange",
    orientationModes:[Ti.UI.PORTRAIT],
}

      

TiApp.XML:

<statusbar-style>default</statusbar-style>
<statusbar-hidden>true</statusbar-hidden>
<fullscreen>true</fullscreen>
<navbar-hidden>true</navbar-hidden>

      

But none of these options work to hide this black bar. In iOS simulator, it removes the navigation bar by setting the property fullscreen

to true

Are there any other options to get this? Thanks in advance!

+3


source to share


3 answers


Could it be an ActionBar? Try to hide it.

To change the theme to hide the action bar:

  • Add your own theme file to the project:

Platform / android / res / values ​​/ custom_theme.xml:



<?xml version="1.0" encoding="utf-8"?> <resources>
    <style name="Theme.NoActionBar" parent="@style/Theme.Titanium">
        <!-- Depending on the parent theme, this may be called android:windowActionBar instead of windowActionBar -->
        <item name="windowActionBar">false</item>
    </style> </resources>

      

Taken from: http://docs.appcelerator.com/titanium/3.0/#!/guide/Android_Action_Bar

+2


source


If you are using Titanium SDK 3.3.0, the Titanium theme, which is one of the default themes, now hides the action and status bar. To use it, just add it to your tiapp.xml file.

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

      



You can read more about this and other themes that Titanium has for Android here: Android Themes .

+13


source


I just added below code to my TiApp.xml file to hide the action bar where my app name and Titanium logo were

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

      

You can also hide the status bar (when clock, battery level, notifications, etc.) by adding a status bar bar

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

      

+1


source







All Articles