diff --git a/res/drawable-hdpi/ic_contact_picture.png b/res/drawable-hdpi/ic_contact_picture.png index 7c34f5c94..bf93c17e0 100644 Binary files a/res/drawable-hdpi/ic_contact_picture.png and b/res/drawable-hdpi/ic_contact_picture.png differ diff --git a/res/drawable-ldpi/ic_contact_picture.png b/res/drawable-ldpi/ic_contact_picture.png new file mode 100644 index 000000000..3d0ed8095 Binary files /dev/null and b/res/drawable-ldpi/ic_contact_picture.png differ diff --git a/res/drawable-mdpi/ic_contact_picture.png b/res/drawable-mdpi/ic_contact_picture.png new file mode 100644 index 000000000..eabb3436a Binary files /dev/null and b/res/drawable-mdpi/ic_contact_picture.png differ diff --git a/res/drawable-xhdpi/ic_contact_picture.png b/res/drawable-xhdpi/ic_contact_picture.png new file mode 100644 index 000000000..0c4e8abba Binary files /dev/null and b/res/drawable-xhdpi/ic_contact_picture.png differ diff --git a/res/layout/message_list_item.xml b/res/layout/message_list_item.xml index 72bca7ed8..f66aae15f 100644 --- a/res/layout/message_list_item.xml +++ b/res/layout/message_list_item.xml @@ -41,10 +41,6 @@ android:layout_height="48dip" android:layout_width="48dip" android:layout_toRightOf="@id/chip_wrapper" - android:adjustViewBounds="true" - android:scaleType="centerCrop" - android:maxWidth="48dp" - android:maxHeight="48dp" android:src="@drawable/ic_contact_picture" style="?android:attr/quickContactBadgeStyleWindowLarge" android:background="@android:color/transparent" /> diff --git a/src/com/fsck/k9/fragment/MessageListFragment.java b/src/com/fsck/k9/fragment/MessageListFragment.java index 6cbca58cf..777d9f6d4 100644 --- a/src/com/fsck/k9/fragment/MessageListFragment.java +++ b/src/com/fsck/k9/fragment/MessageListFragment.java @@ -1850,6 +1850,12 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick if (holder.contactBadge != null) { holder.contactBadge.assignContactFromEmail(counterpartyAddress, true); if (counterpartyAddress != null) { + /* + * At least in Android 2.2 a different background + padding is used when no + * email address is available. ListView reuses the views but QuickContactBadge + * doesn't reset the padding, so we do it ourselves. + */ + holder.contactBadge.setPadding(0, 0, 0, 0); mContactsPictureLoader.loadContactPicture(counterpartyAddress, holder.contactBadge); } else { holder.contactBadge.setImageResource(R.drawable.ic_contact_picture);