aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThialfihar <thi@thialfihar.org>2015-06-26 14:47:59 +0200
committerThialfihar <thi@thialfihar.org>2015-07-21 20:56:41 +0200
commite267daf602ad81d0fc0d476958ce6729c55e10b0 (patch)
treec0270d4a92e95b31ff744a3d3b9589a808a0f63a
parent506630552a810979d225ddd479e30cb8cd7341fb (diff)
downloadopen-keychain-e267daf602ad81d0fc0d476958ce6729c55e10b0.tar.gz
open-keychain-e267daf602ad81d0fc0d476958ce6729c55e10b0.tar.bz2
open-keychain-e267daf602ad81d0fc0d476958ce6729c55e10b0.zip
Make import keys activity honour the theme
This changes the light theme slightly as well, it uses the actual background instead of pure white and removes the thick superfluous divider on top. The divider at the bottom now has no margin, making the separation from the FrameLayout on top more consistent, especially when there is scrollable content.
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java6
-rw-r--r--OpenKeychain/src/main/res/layout/import_keys_activity.xml24
2 files changed, 8 insertions, 22 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
index cae82b445..0be7e8f76 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
@@ -198,11 +198,11 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
if (entry.isSecretKey()) {
holder.mainUserId.setTextColor(Color.RED);
} else {
- holder.mainUserId.setTextColor(Color.BLACK);
+ holder.mainUserId.setTextColor(FormattingUtils.getColorFromAttr(mActivity, R.attr.colorText));
}
- holder.mainUserIdRest.setTextColor(Color.BLACK);
- holder.keyId.setTextColor(Color.BLACK);
+ holder.mainUserIdRest.setTextColor(FormattingUtils.getColorFromAttr(mActivity, R.attr.colorText));
+ holder.keyId.setTextColor(FormattingUtils.getColorFromAttr(mActivity, R.attr.colorText));
}
if (entry.getUserIds().size() == 1) {
diff --git a/OpenKeychain/src/main/res/layout/import_keys_activity.xml b/OpenKeychain/src/main/res/layout/import_keys_activity.xml
index 332b95ce5..28bb8a0b8 100644
--- a/OpenKeychain/src/main/res/layout/import_keys_activity.xml
+++ b/OpenKeychain/src/main/res/layout/import_keys_activity.xml
@@ -25,21 +25,11 @@
android:id="@+id/import_keys_top_container"
android:layout_width="match_parent"
android:layout_height="64dp"
- android:orientation="vertical"
- android:background="@android:color/white" />
+ android:orientation="vertical" />
<View
android:layout_width="match_parent"
- android:layout_height="2dip"
- android:background="?android:attr/listDivider" />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="16dp" />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="2dip"
+ android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<FrameLayout
@@ -47,22 +37,18 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
- android:layout_weight="1"
- android:background="@android:color/white" />
+ android:layout_weight="1" />
<RelativeLayout
android:id="@+id/import_footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="@android:color/white">
+ android:orientation="vertical">
<View
android:id="@+id/import_divider"
android:layout_width="match_parent"
android:layout_height="1dip"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
android:background="?android:attr/listDivider" />
<TextView
@@ -91,4 +77,4 @@
</RelativeLayout>
</LinearLayout>
-</RelativeLayout> \ No newline at end of file
+</RelativeLayout>