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-19081] Android: Add Theme.AppCompat.NoTitleBar to default themes #6966

Merged
merged 1 commit into from Jul 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions android/cli/commands/_build.js
Expand Up @@ -2082,6 +2082,13 @@ AndroidBuilder.prototype.checkIfShouldForceRebuild = function checkIfShouldForce
return true;
}

if (this.tiapp.navbarHidden != manifest.navbarHidden) {
this.logger.info(__('Forcing rebuild: tiapp.xml navbar-hidden changed since last build'));
this.logger.info(' ' + __('Was: %s', manifest.navbarHidden));
this.logger.info(' ' + __('Now: %s', this.tiapp.navbarHidden));
return true;
}

if (this.minSDK != manifest.minSDK) {
this.logger.info(__('Forcing rebuild: Android minimum SDK changed since last build'));
this.logger.info(' ' + __('Was: %s', manifest.minSDK));
Expand Down Expand Up @@ -4217,6 +4224,7 @@ AndroidBuilder.prototype.writeBuildManifest = function writeBuildManifest(callba
guid: this.tiapp.guid,
icon: this.tiapp.icon,
fullscreen: this.tiapp.fullscreen,
navbarHidden: this.tiapp['navbar-hidden'],
skipJSMinification: !!this.cli.argv['skip-js-minify'],
mergeCustomAndroidManifest: this.config.get('android.mergeCustomAndroidManifest', false),
encryptJS: this.encryptJS,
Expand Down
2 changes: 1 addition & 1 deletion android/templates/build/AndroidManifest.xml
Expand Up @@ -14,7 +14,7 @@
<application android:icon="@drawable/appicon"
android:label="<%- tiapp.name %>" android:name="<%- classname %>Application"
android:debuggable="false"
android:theme="@style/Theme.AppCompat">
android:theme="@style/Theme.AppCompat<% if (tiapp.fullscreen || tiapp['statusbar-hidden'] || tiapp['navbar-hidden']) { %>.NoTitleBar<% if (tiapp.fullscreen || tiapp['statusbar-hidden']) { %>.Fullscreen<% } %><% } %>">

<activity android:name=".<%- classname %>Activity"
android:label="@string/app_name" android:theme="@style/Theme.Titanium"
Expand Down
10 changes: 8 additions & 2 deletions android/templates/build/theme.xml
@@ -1,15 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.AppCompat.Fullscreen">
<style name="Theme.AppCompat.NoTitleBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowActionBar">false</item>
<!-- AppCompat Compatibility -->
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="Theme.AppCompat.NoTitleBar.Fullscreen">
<item name="android:windowFullscreen">true</item>
</style>

<!-- Legacy Compatibility -->
<style name="Theme.AppCompat.Fullscreen" parent="@style/Theme.AppCompat.NoTitleBar.Fullscreen" />

<style name="Theme.Titanium" parent="@style/<%- flags %>">
<item name="android:windowBackground">@drawable/background</item>
<item name="android:windowActionBar">false</item>
Expand Down