Add theme setting

This prepares that different themes can be added. Currently light and
dark will just use the default OK theme.
This commit is contained in:
Thialfihar
2015-06-25 15:17:32 +02:00
parent e4b113701c
commit e51eff4050
11 changed files with 123 additions and 12 deletions

View File

@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="KeychainTheme" parent="KeychainTheme.Base" />
<style name="KeychainTheme.Base" parent="Theme.AppCompat.Light">
<style name="LightBaseTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
@@ -16,6 +14,25 @@
<item name="searchViewStyle">@style/MySearchViewStyle</item>
</style>
<style name="DarkBaseTheme" parent="Theme.AppCompat">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<!-- remove actionbar and title, we use toolbar! -->
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<!-- multi selection should overlay Toolbar! http://stackoverflow.com/a/26450875 -->
<item name="windowActionModeOverlay">true</item>
<item name="searchViewStyle">@style/MySearchViewStyle</item>
</style>
<style name="LightTheme" parent="LightBaseTheme">
</style>
<style name="DarkTheme" parent="DarkBaseTheme">
</style>
<!-- http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html -->
<style name="MySearchViewStyle" parent="Widget.AppCompat.SearchView">
<!-- Background for the search query section (e.g. EditText) -->
@@ -40,4 +57,4 @@
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
</resources>
</resources>