How to edit Theme.xml in Titanium?

Asked

Viewed 29 times

1

I need to remove actionBar from my project and the best way I could find was to edit Theme.xml. However, when I edit it, I cannot save it and soon, my actionBar remains active. I tried to put the line code (below) but when emulated, my windows do not load. I tried to write at the beginning and at the end of the project, without success. $.index.Activity.actionBar.Hide();

1 answer

0

After editing Theme.xml, it is necessary to reference it in tiapp.xml, inside the manifest tag, example:

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

However, in the latest versions of Titanium (as of 4.2.0), you can remove Actionbar from a Window using the "Theme property":

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

The complete documentation you can find here: http://docs.appcelerator.com/platform/latest/#! /guide/Android_themes-Section-34636181_AndroidThemes-Titaniumthemes

Browser other questions tagged

You are not signed in. Login or sign up in order to post.