[TIMOB-27837] Android: Custom theme ignored by modal/translucent windows as of 9.0.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-04-10T19:42:49.000+0000 |
Affected Version/s | Release 9.0.0 |
Fix Version/s | Release 9.0.1 |
Components | Android |
Labels | android, modal, regression, theme, translucent, window |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2020-04-08T00:51:37.000+0000 |
Updated | 2020-06-16T14:30:09.000+0000 |
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:*
Create a Classic app project with below files.
Build and run on Android.
Notice modal window's title bar is dark gray, but theme sets it to red.
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>
PR (master): https://github.com/appcelerator/titanium_mobile/pull/11600 PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11601
FR Passed on Master and 9_0_X. waiting on Jenkins build.
merged to master and 9_0_X
Verified on: Mac OS: 10.15.4 SDK: 9.0.1.v20200409100807, 9.1.0.v20200409073825 Appc CLI: 8.0.0 JDK: 11.0.4 Node: 10.17.0 Device: Pixel3(v10.0) emulator,