I have set up the styles in platform/android/res/values/mycustomtheme.xml where I am trying to access the style property set in the XML from js file using the below line but it is not working.

var win = Ti.UI.createWindow({theme: "MyThemeActionbar"});
1

There are 1 best solutions below

3
miga On BEST ANSWER

It depends on how you call you theme inside that XML file. E.g. my theme XML starts like this:

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <style name="Theme.MyThemeActionbar" parent="Theme.AppCompat">
    ...

and I use the following TSS:

"Window" : {
    theme: "Theme.MyThemeActionbar"
}