Adpt official theme naming schema

This commit is contained in:
Dominik Schürmann
2015-08-12 17:09:07 +02:00
parent 65517f0d06
commit 0326bbce6b
4 changed files with 18 additions and 18 deletions

View File

@@ -73,7 +73,7 @@
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/LightTheme"> android:theme="@style/Theme.Keychain.Light">
<activity <activity
android:name=".ui.MainActivity" android:name=".ui.MainActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
@@ -701,7 +701,7 @@
--> -->
<activity <activity
android:name=".ui.NfcOperationActivity" android:name=".ui.NfcOperationActivity"
android:theme="@style/KeychainTheme.LightSecurityTokenDialog" android:theme="@style/Theme.Keychain.Light.Dialog.SecurityToken"
android:allowTaskReparenting="true" android:allowTaskReparenting="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:taskAffinity=":Nfc" /> android:taskAffinity=":Nfc" />

View File

@@ -59,9 +59,9 @@ public class ThemeChanger {
return false; return false;
} }
int themeId = R.style.LightTheme; int themeId = R.style.Theme_Keychain_Light;
if (Constants.Pref.Theme.DARK.equals(newTheme)) { if (Constants.Pref.Theme.DARK.equals(newTheme)) {
themeId = R.style.DarkTheme; themeId = R.style.Theme_Keychain_Dark;
} }
ContextThemeWrapper w = new ContextThemeWrapper(mContext, themeId); ContextThemeWrapper w = new ContextThemeWrapper(mContext, themeId);

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="LightTheme" parent="LightBaseTheme"> <style name="Theme.Keychain.Light" parent="Base.Theme.Keychain.Light">
<item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentStatus">true</item>
<!-- enable window content transitions --> <!-- enable window content transitions -->
@@ -13,7 +13,7 @@
</style> </style>
<style name="DarkTheme" parent="DarkBaseTheme"> <style name="Theme.Keychain.Dark" parent="Base.Theme.Keychain.Dark">
<item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentStatus">true</item>
<!-- enable window content transitions --> <!-- enable window content transitions -->

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="LightBaseTheme" parent="Theme.AppCompat.Light"> <style name="Base.Theme.Keychain.Light" parent="Theme.AppCompat.Light">
<item name="colorPrimary">#7bad45</item> <item name="colorPrimary">#7bad45</item>
<item name="colorPrimaryDark">#6c983d</item> <item name="colorPrimaryDark">#6c983d</item>
<item name="colorAccent">#2196f3</item> <item name="colorAccent">#2196f3</item>
@@ -36,13 +36,13 @@
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<!-- multi selection should overlay Toolbar! http://stackoverflow.com/a/26450875 --> <!-- multi selection should overlay Toolbar! http://stackoverflow.com/a/26450875 -->
<item name="windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<item name="searchViewStyle">@style/MySearchViewStyle</item> <item name="searchViewStyle">@style/Widget.Keychain.SearchView</item>
<!-- style dialogs --> <!-- style dialogs -->
<item name="alertDialogTheme">@style/KeychainTheme.LightDialog</item> <item name="alertDialogTheme">@style/Theme.Keychain.Light.Dialog</item>
</style> </style>
<style name="DarkBaseTheme" parent="MaterialDrawerTheme.ActionBar"> <style name="Base.Theme.Keychain.Dark" parent="MaterialDrawerTheme.ActionBar">
<item name="colorPrimary">#268bd2</item> <item name="colorPrimary">#268bd2</item>
<item name="colorPrimaryDark">#166bb2</item> <item name="colorPrimaryDark">#166bb2</item>
<item name="colorAccent">#2196f3</item> <item name="colorAccent">#2196f3</item>
@@ -79,20 +79,20 @@
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<!-- multi selection should overlay Toolbar! http://stackoverflow.com/a/26450875 --> <!-- multi selection should overlay Toolbar! http://stackoverflow.com/a/26450875 -->
<item name="windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<item name="searchViewStyle">@style/MySearchViewStyle</item> <item name="searchViewStyle">@style/Widget.Keychain.SearchView</item>
<!-- style dialogs --> <!-- style dialogs -->
<item name="alertDialogTheme">@style/KeychainTheme.DarkDialog</item> <item name="alertDialogTheme">@style/Theme.Keychain.Dark.Dialog</item>
</style> </style>
<style name="LightTheme" parent="LightBaseTheme"> <style name="Theme.Keychain.Light" parent="Base.Theme.Keychain.Light">
</style> </style>
<style name="DarkTheme" parent="DarkBaseTheme"> <style name="Theme.Keychain.Dark" parent="Base.Theme.Keychain.Dark">
</style> </style>
<!-- http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html --> <!-- http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html -->
<style name="MySearchViewStyle" parent="Widget.AppCompat.SearchView"> <style name="Widget.Keychain.SearchView" parent="Widget.AppCompat.SearchView">
<!-- Background for the search query section (e.g. EditText) --> <!-- Background for the search query section (e.g. EditText) -->
<!--<item name="queryBackground">...</item>--> <!--<item name="queryBackground">...</item>-->
<!-- Background for the actions section (e.g. voice, submit) --> <!-- Background for the actions section (e.g. voice, submit) -->
@@ -111,15 +111,15 @@
<!--<item name="suggestionRowLayout">...</item>--> <!--<item name="suggestionRowLayout">...</item>-->
</style> </style>
<style name="KeychainTheme.LightDialog" parent="Base.Theme.AppCompat.Light.Dialog.Alert"> <style name="Theme.Keychain.Light.Dialog" parent="Base.Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">#7bad45</item> <item name="colorAccent">#7bad45</item>
</style> </style>
<style name="KeychainTheme.DarkDialog" parent="Base.Theme.AppCompat.Light.Dialog.Alert"> <style name="Theme.Keychain.Dark.Dialog" parent="Base.Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">#268bd2</item> <item name="colorAccent">#268bd2</item>
</style> </style>
<style name="KeychainTheme.LightSecurityTokenDialog" parent="Theme.AppCompat.Light.Dialog.MinWidth"> <style name="Theme.Keychain.Light.Dialog.SecurityToken" parent="Theme.AppCompat.Light.Dialog.MinWidth">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
</style> </style>