From 0516b80c0770a8b2cd50a386640b2761b6c08bd5 Mon Sep 17 00:00:00 2001 From: Tim Bray Date: Tue, 21 Oct 2014 11:35:03 -0700 Subject: [PATCH] Make the Certify screen a little more self-explanatory --- .../ui/adapter/MultiUserIdsAdapter.java | 11 ++-- .../main/res/layout/multi_certify_item.xml | 53 ++++++------------- .../res/layout/multi_certify_key_fragment.xml | 34 +++--------- OpenKeychain/src/main/res/values/strings.xml | 6 +-- 4 files changed, 32 insertions(+), 72 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java index 7a4d77145..50cdb0e04 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java @@ -69,8 +69,7 @@ public class MultiUserIdsAdapter extends CursorAdapter { @Override public void bindView(View view, Context context, Cursor cursor) { - View vHeader = view.findViewById(R.id.user_id_header); - TextView vHeaderId = (TextView) view.findViewById(R.id.user_id_header_id); + TextView vHeaderId = (TextView) view.findViewById(R.id.user_id_header); TextView vName = (TextView) view.findViewById(R.id.user_id_item_name); TextView vAddresses = (TextView) view.findViewById(R.id.user_id_item_addresses); @@ -84,10 +83,12 @@ public class MultiUserIdsAdapter extends CursorAdapter { if (isHeader == 1) { long masterKeyId = cursor.getLong(0); - vHeader.setVisibility(View.VISIBLE); - vHeaderId.setText(KeyFormattingUtils.beautifyKeyIdWithPrefix(mContext, masterKeyId)); + vHeaderId.setVisibility(View.VISIBLE); + String message = mContext.getString(R.string.section_uids_to_certify) + + KeyFormattingUtils.beautifyKeyIdWithPrefix(mContext, masterKeyId); + vHeaderId.setText(message); } else { - vHeader.setVisibility(View.GONE); + vHeaderId.setVisibility(View.GONE); } { // first one diff --git a/OpenKeychain/src/main/res/layout/multi_certify_item.xml b/OpenKeychain/src/main/res/layout/multi_certify_item.xml index c578473d3..71838c2fc 100644 --- a/OpenKeychain/src/main/res/layout/multi_certify_item.xml +++ b/OpenKeychain/src/main/res/layout/multi_certify_item.xml @@ -6,50 +6,29 @@ android:orientation="vertical" android:singleLine="true"> - - - - - - - - - - - + + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:singleLine="true" + android:layout_marginLeft="8dip" + android:layout_marginTop="4dip"> diff --git a/OpenKeychain/src/main/res/layout/multi_certify_key_fragment.xml b/OpenKeychain/src/main/res/layout/multi_certify_key_fragment.xml index d2335cbe9..851464dd3 100644 --- a/OpenKeychain/src/main/res/layout/multi_certify_key_fragment.xml +++ b/OpenKeychain/src/main/res/layout/multi_certify_key_fragment.xml @@ -10,37 +10,17 @@ android:paddingRight="16dp" android:orientation="vertical"> - - - - - - - - - + android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="@string/certify_text" + android:id="@+id/textView" + android:layout_weight="1" /> "Name" "Comment" "Email" - "Synchronize with public keyservers" + "Share your certification with the cloud" "Fingerprint" "Set expiry date" "(First keyserver listed is preferred)" @@ -1013,8 +1013,8 @@ "<unknown>" "No certificates for this key" "Only validated self-certificates and validated certificates created with your keys are displayed here." - "Identities" - "Do the selected identities match the persons you are exchanging keys with? Deselect all unknown ones." + "Identities for " + "The keys you’re importing contain “identities”: names and emails. If these match what you expected, you can say so by “certifying” them. If they don’t match, you probably shouldn’t use these keys." "Revocation Reason" "Verification Status" "Type"