-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(android): use material theme by default
- Changed default theme from "Theme.AppCompat" to "Theme.MaterialComponents.Bridge". * The material bridge uses the same dark theme as AppCompat and adds the new material styles. - Fixed bug where modal/translucent windows ignore "tiapp.xml" setting <navbar-hidden/>. - Added new Titanium themes which derive from custom theme assigned to app. - Deprecated "Theme.AppCompat.*" since material widgets require a material theme. Fixes TIMOB-27714, TIMOB-28084, TIMOB-28087
- Loading branch information
1 parent
82adb71
commit eb46ca0
Showing
10 changed files
with
104 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
android/templates/app/angular-default/template/platform/android/res/values/styles.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<style name="TitaniumAngular" parent="Theme.AppCompat.Light.DarkActionBar"> | ||
<style name="TitaniumAngular" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge"> | ||
<item name="colorPrimary">@color/angularBlue</item> | ||
<item name="colorPrimaryDark">@color/angularDarkBlue</item> | ||
<item name="colorAccent">@color/angularRed</item> | ||
<item name="android:windowBackground">@color/windowBackground</item> | ||
<item name="android:textColor">#444</item> | ||
</style> | ||
</style> | ||
</resources> |
2 changes: 1 addition & 1 deletion
2
android/templates/app/webpack-default/template/platform/android/res/values/styles.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,114 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<!-- Base theme applied to all Titanium transluent windows and splash activity. --> | ||
<!-- Our "_build.js" script will replace it with ".Fullscreen" theme if set in "tiapp.xml" file. --> | ||
<style name="Base.Theme.Titanium.Basic" parent="Theme.AppCompat"/> | ||
<!-- Base theme applied to Titanium's splash screen activity. --> | ||
<!-- Our "_build.js" will replace it with ".NoActionBar" or ".Fullscreen" theme if set in "tiapp.xml" file. --> | ||
<style name="Base.Theme.Titanium.Basic" parent="Theme.MaterialComponents.Bridge"/> | ||
|
||
<!-- Base theme applied to all Titanium opaque windows. --> | ||
<!-- Our "_build.js" script will replace it if custom theme is applied to application in manifest. --> | ||
<style name="Base.Theme.Titanium.Customizable" parent="Theme.AppCompat"/> | ||
|
||
<!-- Base theme to be used by the "TiRootActivity" class. --> | ||
<style name="Base.Theme.Titanium.Splash" parent="@style/Base.Theme.Titanium.Basic"> | ||
<style name="Base.Theme.Titanium.Splash" parent="Base.Theme.Titanium.Basic"> | ||
<item name="android:windowActionBar">false</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</item> | ||
</style> | ||
|
||
<style name="Theme.AppCompat.NoTitleBar"> | ||
<item name="android:windowNoTitle">true</item> | ||
<!-- Theme to be replaced by app project and have a "windowBackground" image applied to it. --> | ||
<!-- Our Android "_build.js" script will replace this theme via the generateTheme() method. --> | ||
<style name="Theme.Titanium" parent="Base.Theme.Titanium.Splash"/> | ||
|
||
<!-- Activity theme used to remove top title bar, but keeps status bar and app theme. --> | ||
<style name="Theme.Titanium.NoTitleBar" parent="Base.Theme.Titanium.Customizable"> | ||
<item name="android:windowActionBar">false</item> | ||
<item name="android:windowContentOverlay">@null</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</item> | ||
</style> | ||
|
||
<!-- Activity theme used to remove top status bar and title bar while preserving app theme. --> | ||
<style name="Theme.Titanium.Fullscreen" parent="Theme.Titanium.NoTitleBar"> | ||
<item name="android:windowFullscreen">true</item> | ||
</style> | ||
|
||
<!-- Activity theme applying transparent background while preserving app theme. --> | ||
<style name="Theme.Titanium.Translucent" parent="Base.Theme.Titanium.Customizable"> | ||
<item name="android:colorBackgroundCacheHint">@null</item> | ||
<item name="android:windowAnimationStyle">@null</item> | ||
<item name="android:windowBackground">@android:color/transparent</item> | ||
<item name="android:windowIsTranslucent">true</item> | ||
</style> | ||
|
||
<!-- Activity theme applying transparent background and removes title bar, while preserving app theme. --> | ||
<style name="Theme.Titanium.Translucent.NoTitleBar" parent="Theme.Titanium.Translucent"> | ||
<item name="android:windowActionBar">false</item> | ||
<!-- AppCompat Compatibility --> | ||
<item name="android:windowContentOverlay">@null</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</item> | ||
</style> | ||
|
||
<style name="Theme.AppCompat.NoTitleBar.Fullscreen"> | ||
<!-- Activity theme with transparent background, removes status bar and title bar while preserving app theme. --> | ||
<style name="Theme.Titanium.Translucent.Fullscreen" parent="Theme.Titanium.Translucent.NoTitleBar"> | ||
<item name="android:windowFullscreen">true</item> | ||
</style> | ||
|
||
<style name="Theme.AppCompat.Fullscreen" parent="@style/Theme.AppCompat.NoTitleBar.Fullscreen"/> | ||
<!-- Inherits Google's "Theme.MaterialComponents.Bridge" and removes top status and title bar. --> | ||
<style name="Theme.MaterialComponents.Fullscreen.Bridge" parent="Theme.MaterialComponents.Bridge"> | ||
<item name="android:windowActionBar">false</item> | ||
<item name="android:windowContentOverlay">@null</item> | ||
<item name="android:windowFullscreen">true</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</item> | ||
</style> | ||
|
||
<!-- Theme to be replaced by app project and have a "windowBackground" image applied to it. --> | ||
<!-- Our Android "_build.js" script will replace this theme via the generateTheme() method. --> | ||
<style name="Theme.Titanium" parent="@style/Base.Theme.Titanium.Splash"/> | ||
<!-- Google's dark AppCompat activity theme without a top title bar. --> | ||
<!-- DEPRECATED: Should use MaterialComponents theme instead in order to use material widgets. --> | ||
<style name="Theme.AppCompat.NoTitleBar" parent="Theme.AppCompat"> | ||
<item name="android:windowActionBar">false</item> | ||
<item name="android:windowContentOverlay">@null</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</item> | ||
</style> | ||
|
||
<!-- Theme to be used by Titanium's translucent windows and modal windows. --> | ||
<style name="Theme.Titanium.Translucent" parent="@style/Base.Theme.Titanium.Customizable"> | ||
<item name="android:windowBackground">@android:color/transparent</item> | ||
<item name="android:colorBackgroundCacheHint">@null</item> | ||
<item name="android:windowIsTranslucent">true</item> | ||
<item name="android:windowAnimationStyle">@android:style/Animation</item> | ||
<!-- Google's dark AppCompat activity theme without a top status bar and title bar. --> | ||
<!-- DEPRECATED: Should use MaterialComponents theme instead in order to use material widgets. --> | ||
<style name="Theme.AppCompat.NoTitleBar.Fullscreen" parent="Theme.AppCompat.NoTitleBar"> | ||
<item name="android:windowFullscreen">true</item> | ||
</style> | ||
|
||
<style name="Theme.AppCompat.Translucent" parent="@style/Base.Theme.Titanium.Basic"> | ||
<!-- Google's dark AppCompat activity theme without a top status bar and title bar. --> | ||
<!-- DEPRECATED: Should use MaterialComponents theme instead in order to use material widgets. --> | ||
<style name="Theme.AppCompat.Fullscreen" parent="Theme.AppCompat.NoTitleBar.Fullscreen"/> | ||
|
||
<!-- Google's dark AppCompat activity theme with a transparent background. --> | ||
<!-- DEPRECATED: Should use MaterialComponents theme instead in order to use material widgets. --> | ||
<style name="Theme.AppCompat.Translucent" parent="Theme.AppCompat"> | ||
<item name="android:windowBackground">@android:color/transparent</item> | ||
<item name="android:colorBackgroundCacheHint">@null</item> | ||
<item name="android:windowIsTranslucent">true</item> | ||
<item name="android:actionBarStyle">@style/Base.Widget.AppCompat.ActionBar.Solid</item> | ||
<!-- AppCompat Compatibility --> | ||
<item name="actionBarStyle">@style/Base.Widget.AppCompat.ActionBar.Solid</item> | ||
</style> | ||
<style name="Theme.AppCompat.Translucent.NoTitleBar"> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="android:windowContentOverlay">@null</item> | ||
|
||
<!-- Google's dark AppCompat activity theme with a transparent background without a title bar. --> | ||
<!-- DEPRECATED: Should use MaterialComponents theme instead in order to use material widgets. --> | ||
<style name="Theme.AppCompat.Translucent.NoTitleBar" parent="Theme.AppCompat.Translucent"> | ||
<item name="android:windowActionBar">false</item> | ||
<!-- AppCompat Compatibility --> | ||
<item name="android:windowContentOverlay">@null</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</item> | ||
</style> | ||
|
||
<style name="Theme.AppCompat.Translucent.NoTitleBar.Fullscreen"> | ||
|
||
<!-- Google's dark AppCompat activity theme with a transparent background without a status bar and title bar. --> | ||
<!-- DEPRECATED: Should use MaterialComponents theme instead in order to use material widgets. --> | ||
<style name="Theme.AppCompat.Translucent.NoTitleBar.Fullscreen" parent="Theme.AppCompat.Translucent.NoTitleBar"> | ||
<item name="android:windowFullscreen">true</item> | ||
</style> | ||
</resources> |