aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/res
diff options
context:
space:
mode:
authorThialfihar <thi@thialfihar.org>2015-06-26 14:08:26 +0200
committerThialfihar <thi@thialfihar.org>2015-07-21 20:56:41 +0200
commit506630552a810979d225ddd479e30cb8cd7341fb (patch)
tree959ba0e384bd86d50bd781af211d1bd410e06d6b /OpenKeychain/src/main/res
parent1c3fbe9bbe28a9c55697fc34608c781cc095c984 (diff)
downloadopen-keychain-506630552a810979d225ddd479e30cb8cd7341fb.tar.gz
open-keychain-506630552a810979d225ddd479e30cb8cd7341fb.tar.bz2
open-keychain-506630552a810979d225ddd479e30cb8cd7341fb.zip
Make CardView background themeable
However, CardViews displaying QR codes keep a fixed white background.
Diffstat (limited to 'OpenKeychain/src/main/res')
-rw-r--r--OpenKeychain/src/main/res/layout/certify_fingerprint_fragment.xml4
-rw-r--r--OpenKeychain/src/main/res/layout/view_key_fragment.xml4
-rw-r--r--OpenKeychain/src/main/res/layout/view_key_yubikey.xml2
-rw-r--r--OpenKeychain/src/main/res/values/attrs.xml1
-rw-r--r--OpenKeychain/src/main/res/values/themes.xml2
5 files changed, 8 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/res/layout/certify_fingerprint_fragment.xml b/OpenKeychain/src/main/res/layout/certify_fingerprint_fragment.xml
index 9b6b35012..bd7b00823 100644
--- a/OpenKeychain/src/main/res/layout/certify_fingerprint_fragment.xml
+++ b/OpenKeychain/src/main/res/layout/certify_fingerprint_fragment.xml
@@ -28,7 +28,7 @@
android:id="@+id/certify_fingerprint_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:cardBackgroundColor="@android:color/white"
+ app:cardBackgroundColor="?attr/colorCardViewBackground"
app:cardUseCompatPadding="true"
app:cardCornerRadius="4dp"
android:layout_gravity="top">
@@ -151,4 +151,4 @@
-</RelativeLayout> \ No newline at end of file
+</RelativeLayout>
diff --git a/OpenKeychain/src/main/res/layout/view_key_fragment.xml b/OpenKeychain/src/main/res/layout/view_key_fragment.xml
index a71eb5880..8c1023427 100644
--- a/OpenKeychain/src/main/res/layout/view_key_fragment.xml
+++ b/OpenKeychain/src/main/res/layout/view_key_fragment.xml
@@ -17,7 +17,7 @@
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- card_view:cardBackgroundColor="@android:color/white"
+ card_view:cardBackgroundColor="?attr/colorCardViewBackground"
card_view:cardElevation="2dp"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="4dp">
@@ -47,7 +47,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
- card_view:cardBackgroundColor="@android:color/white"
+ card_view:cardBackgroundColor="?attr/colorCardViewBackground"
card_view:cardElevation="2dp"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="4dp">
diff --git a/OpenKeychain/src/main/res/layout/view_key_yubikey.xml b/OpenKeychain/src/main/res/layout/view_key_yubikey.xml
index 83272ef4e..57f93493d 100644
--- a/OpenKeychain/src/main/res/layout/view_key_yubikey.xml
+++ b/OpenKeychain/src/main/res/layout/view_key_yubikey.xml
@@ -18,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:transitionName="card"
- card_view:cardBackgroundColor="@android:color/white"
+ card_view:cardBackgroundColor="?attr/colorCardViewBackground"
card_view:cardElevation="2dp"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="4dp"
diff --git a/OpenKeychain/src/main/res/values/attrs.xml b/OpenKeychain/src/main/res/values/attrs.xml
index 7a3d2cfc6..a1d5e5393 100644
--- a/OpenKeychain/src/main/res/values/attrs.xml
+++ b/OpenKeychain/src/main/res/values/attrs.xml
@@ -13,5 +13,6 @@
<attr name="colorCardViewHeaderDivider" format="color" />
<attr name="colorText" format="color" />
<attr name="colorBrightToolbar" format="color" />
+ <attr name="colorCardViewBackground" format="color" />
</declare-styleable>
</resources>
diff --git a/OpenKeychain/src/main/res/values/themes.xml b/OpenKeychain/src/main/res/values/themes.xml
index 809ccd0b4..649b4b7aa 100644
--- a/OpenKeychain/src/main/res/values/themes.xml
+++ b/OpenKeychain/src/main/res/values/themes.xml
@@ -16,6 +16,7 @@
<item name="colorButtonRow">#33cccccc</item>
<item name="colorLogBackground">#cecbce</item>
<item name="colorCardViewHeaderDivider">#808080</item>
+ <item name="colorCardViewBackground">#ffffff</item>
<item name="colorText">#000000</item>
<item name="colorHeaderText">#212121</item>
@@ -44,6 +45,7 @@
<item name="colorButtonRow">#33cccccc</item>
<item name="colorLogBackground">#303030</item>
<item name="colorCardViewHeaderDivider">#808080</item>
+ <item name="colorCardViewBackground">#505050</item>
<item name="colorText">#ffffff</item>
<item name="colorHeaderText">#d0d0d0</item>