New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-17493] Android: Default Translucent theme overwrites custom themes. #9216
Conversation
@@ -3338,18 +3338,21 @@ AndroidBuilder.prototype.generateTheme = function generateTheme(next) { | |||
this.logger.info(__('Generating %s', themeFile.cyan)); | |||
|
|||
var flags = 'Theme.AppCompat'; | |||
var defaultProvidedTheme = '@style/' + flags; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to change anything in this file
@@ -33,7 +33,13 @@ | |||
<!-- AppCompat Compatibility --> | |||
<item name="actionBarStyle">@style/Base.Widget.AppCompat.ActionBar.Solid</item> | |||
</style> | |||
|
|||
|
|||
<style name="Theme.AppCompat.Translucent.Default" parent="<%- defaultProvidedTheme %>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not remove
<item name="android:actionBarStyle">@style/Base.Widget.AppCompat.ActionBar.Solid</item>
<item name="actionBarStyle">@style/Base.Widget.AppCompat.ActionBar.Solid</item>
from Theme.AppCompat.Translucent
?
NOTE: Update the docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: SEE COMMENTS
Closed due to being out of sync with latest build and themes changes. Will reopen once I get it back on track or I will create a new one for the issue (if it is still relevant). |
JIRA: https://jira.appcelerator.org/browse/TIMOB-17493
Description:
The default Translucent theme used for activities with opacity property, modal property and incorrect background color format, overwrites any custom theme's values.
Test case:
Custom theme and case provided in the ticket.
Another test case:
Add the following to tiapp.xml:
app.js
As Theme.Titanium has ActionBar disabled I expected to get a translucent window without ActionBar. I got a window with an ActionBar.
Note:
It seems that one of the templates for generating Android manifest file is not used at all. I successfully built and SDK instance and a application without it. Removed it to avoid confusion.