Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27837

Android: Custom theme ignored by modal/translucent windows as of 9.0.0

    Details

    • Story Points:
      5
    • Sprint:
      2020 Sprint 7

      Description

      Summary:
      As of Titanium 9.0.0, a custom Android theme/style defined in XML is ignored by windows:

      • With "modal" property set to true.
      • With "opacity" property set less than 1.0. (ie: translucent windows)

      Steps to reproduce:

      1. Create a Classic app project with below files.
      2. Build and run on Android.
      3. Notice modal window's title bar is dark gray, but theme sets it to red.
      4. Notice button's text is in all caps, but theme sets it to use lowercase letters.

      app.js

      var window = Ti.UI.createWindow({
      	title: "Modal Window",
      	modal: true,
      });
      var closeButton = Ti.UI.createButton({
      	title: "Close",
      });
      closeButton.addEventListener("click", function() {
      	window.close();
      });
      window.add(closeButton);
      window.open();
      

      tiapp.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <ti:app>
      	<android>
      		<manifest>
      			<application android:theme="@style/MyTheme"/>
      		</manifest>
      	</android>
      </ti:app>
      

      ./platform/android/res/values/my_theme.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <resources>
      	<style name="MyTheme" parent="@style/Theme.AppCompat">
      		<item name="buttonStyle">@style/MyButtonStyle</item>
      		<item name="colorPrimary">#FF0000</item>
      	</style>
      	<style name="MyButtonStyle" parent="@style/Widget.AppCompat.Button">
      		<item name="android:textAllCaps">false</item>
      	</style>
      </resources>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jquick Joshua Quick
                Reviewer:
                Gary Mathews
                Tester:
                Samir Mohammed
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration