From 21e6110b6ded9df4677ca950dee494c4cfc94b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Wed, 9 Apr 2014 19:42:27 +0200 Subject: [PATCH] Prettify some layouts --- .../keychain/ui/ViewKeyMainFragment.java | 1 + .../ui/adapter/ViewKeyKeysAdapter.java | 2 +- .../src/main/res/layout/key_list_fragment.xml | 1 - .../res/layout/view_key_certs_fragment.xml | 3 +- .../main/res/layout/view_key_keys_item.xml | 83 +++++++++---------- .../main/res/layout/view_key_userids_item.xml | 3 +- 6 files changed, 45 insertions(+), 48 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyMainFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyMainFragment.java index 3d4002696..8028ca041 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyMainFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyMainFragment.java @@ -292,6 +292,7 @@ public class ViewKeyMainFragment extends Fragment implements case LOADER_ID_KEYS: // hide encrypt button if no encryption key is available + // TODO: do with subquery! boolean canEncrypt = false; data.moveToFirst(); do { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ViewKeyKeysAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ViewKeyKeysAdapter.java index 64b735bfa..ed274c025 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ViewKeyKeysAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ViewKeyKeysAdapter.java @@ -95,7 +95,7 @@ public class ViewKeyKeysAdapter extends CursorAdapter { ImageView signIcon = (ImageView) view.findViewById(R.id.ic_signKey); ImageView revokedKeyIcon = (ImageView) view.findViewById(R.id.ic_revokedKey); - String keyIdStr = PgpKeyHelper.convertKeyIdToHexShort(cursor.getLong(mIndexKeyId)); + String keyIdStr = PgpKeyHelper.convertKeyIdToHex(cursor.getLong(mIndexKeyId)); String algorithmStr = PgpKeyHelper.getAlgorithmInfo(cursor.getInt(mIndexAlgorithm), cursor.getInt(mIndexKeySize)); diff --git a/OpenKeychain/src/main/res/layout/key_list_fragment.xml b/OpenKeychain/src/main/res/layout/key_list_fragment.xml index f2430f213..951f8d729 100644 --- a/OpenKeychain/src/main/res/layout/key_list_fragment.xml +++ b/OpenKeychain/src/main/res/layout/key_list_fragment.xml @@ -105,5 +105,4 @@ - diff --git a/OpenKeychain/src/main/res/layout/view_key_certs_fragment.xml b/OpenKeychain/src/main/res/layout/view_key_certs_fragment.xml index 2de87f18a..08738ce40 100644 --- a/OpenKeychain/src/main/res/layout/view_key_certs_fragment.xml +++ b/OpenKeychain/src/main/res/layout/view_key_certs_fragment.xml @@ -1,7 +1,6 @@ + android:layout_height="match_parent"> - + android:paddingRight="3dip"> - - - - - - - - + + android:paddingTop="2dip" + android:id="@+id/linearLayout"> - + android:src="@drawable/revoked_key_small" /> + - + + + + + diff --git a/OpenKeychain/src/main/res/layout/view_key_userids_item.xml b/OpenKeychain/src/main/res/layout/view_key_userids_item.xml index e47f591cb..e76902512 100644 --- a/OpenKeychain/src/main/res/layout/view_key_userids_item.xml +++ b/OpenKeychain/src/main/res/layout/view_key_userids_item.xml @@ -42,8 +42,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/label_email" - android:textAppearance="?android:attr/textAppearanceSmall" - android:paddingLeft="10dp" /> + android:textAppearance="?android:attr/textAppearanceSmall" />