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 f322ea980..3fbec118d 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 @@ -151,10 +151,10 @@ public class ImportKeysAdapter extends ArrayAdapter { holder.status.setVisibility(View.GONE); } - LinearLayout ll = (LinearLayout) convertView.findViewById(R.id.list); - ll.removeAllViews(); + LinearLayout userIdsLL = (LinearLayout) convertView.findViewById(R.id.user_ids_list); + userIdsLL.removeAllViews(); if (entry.userIds.size() == 1) { - ll.setVisibility(View.GONE); + userIdsLL.setVisibility(View.GONE); } else { boolean first = true; boolean second = true; @@ -167,12 +167,12 @@ public class ImportKeysAdapter extends ArrayAdapter { View sep = new View(mActivity); sep.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, 1)); sep.setBackgroundResource(android.R.drawable.divider_horizontal_dark); - ll.addView(sep); + userIdsLL.addView(sep); } TextView uidView = (TextView) mInflater.inflate( R.layout.import_keys_list_entry_user_id, null); uidView.setText(uid); - ll.addView(uidView); + userIdsLL.addView(uidView); second = false; } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java index 0c2f7add2..2210975fe 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java @@ -112,13 +112,14 @@ abstract public class SelectKeyCursorAdapter extends HighlightQueryCursorAdapter h.mainUserId.setText(R.string.user_id_no_name); } if (userIdSplit[1] != null) { + h.mainUserIdRest.setVisibility(View.VISIBLE); h.mainUserIdRest.setText(highlightSearchQuery(userIdSplit[1])); } else { - h.mainUserIdRest.setText(""); + h.mainUserIdRest.setVisibility(View.GONE); } long masterKeyId = cursor.getLong(mIndexMasterKeyId); - h.keyId.setText(PgpKeyHelper.convertKeyIdToHexShort(masterKeyId)); + h.keyId.setText(PgpKeyHelper.convertKeyIdToHex(masterKeyId)); boolean enabled = true; if(cursor.getInt(mIndexRevoked) != 0) { diff --git a/OpenKeychain/src/main/res/layout/import_keys_list_entry.xml b/OpenKeychain/src/main/res/layout/import_keys_list_entry.xml index 123104a4d..7630e30d0 100644 --- a/OpenKeychain/src/main/res/layout/import_keys_list_entry.xml +++ b/OpenKeychain/src/main/res/layout/import_keys_list_entry.xml @@ -17,94 +17,90 @@ + android:singleLine="true"> + + + + + android:layout_weight="1" + android:orientation="vertical" + android:paddingLeft="5dip" + android:paddingRight="5dip"> - - + android:text="Alice" + android:textAppearance="?android:attr/textAppearanceMedium" /> - - - - - - - - + android:text="alice@example.com" + android:textAppearance="?android:attr/textAppearanceSmall" /> - + - + - - - - + + android:gravity="right" + android:minWidth="90dip" + android:orientation="vertical" + android:paddingLeft="3dip"> + + + + diff --git a/OpenKeychain/src/main/res/layout/key_list_item.xml b/OpenKeychain/src/main/res/layout/key_list_item.xml index 84ad9f9b5..940181306 100644 --- a/OpenKeychain/src/main/res/layout/key_list_item.xml +++ b/OpenKeychain/src/main/res/layout/key_list_item.xml @@ -10,7 +10,7 @@ android:focusable="false"> + android:singleLine="true"> @@ -19,46 +20,44 @@ android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" - android:paddingLeft="5dip" > + android:paddingLeft="5dip" + android:layout_gravity="center_vertical"> - - - - - + + + \ No newline at end of file