Skip to content
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-25469] Android: Allow translucent theme to inherit custom theme attributes #9581

Merged
merged 11 commits into from Dec 13, 2017

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Nov 1, 2017

  • Allow windows with transparent background to inherit custom theme attributes
TEST CASE
custom_theme.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Theme.NoActionBar" parent="@style/Theme.AppCompat">
        <item name="android:textAllCaps">false</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
	<!-- AppCompat Compatibility -->
	<item name="windowActionBar">false</item>
	<item name="windowNoTitle">true</item>
    </style>
</resources>
tiapp.xml
...
  <application android:theme="@style/Theme.NoActionBar">
...
app.js
var win = Ti.UI.createWindow({backgroundColor: '#00FFFFFF'});
win.open();

JIRA Ticket

@garymathews garymathews added this to the 7.0.0 milestone Nov 1, 2017
@@ -3380,8 +3380,16 @@ AndroidBuilder.prototype.generateTheme = function generateTheme(next) {
flags += '.Fullscreen';
}

let theme = flags;
if (this.tiappAndroidManifest && this.tiappAndroidManifest.application && this.tiappAndroidManifest.application.theme) {
if (theme.startsWith('@style/') && theme !== '@style/Theme.Titanium.Translucent') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe theme should be this.tiappAndroidManifest.application.theme in the condition?

@build
Copy link
Contributor

build commented Nov 16, 2017

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

@garymathews garymathews modified the milestones: 7.0.0, 7.1.0 Nov 27, 2017
@lokeshchdhry
Copy link
Contributor

FR Passed.

When backgroundColor is set to transparent the custom theme gets applied successfully.

Studio Ver: 5.0.0.201712081732
SDK Ver: 7.1.0 local build
OS Ver: 10.12.3
Xcode Ver: Xcode 8.3.3
Appc NPM: 4.2.11
Appc CLI: 7.0.0
Daemon Ver: 1.0.0
Ti CLI Ver: 5.0.14
Alloy Ver: 1.10.10
Node Ver: 8.9.1
Java Ver: 1.8.0_101
Devices: ⇨ google Nexus 5 --- Android 6.0.1
⇨ google Pixel --- Android 7.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants