1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Fix some display issues

This commit is contained in:
cketti 2013-02-08 17:47:22 +01:00
parent b25dfb802d
commit 3a7f1249dc
6 changed files with 6 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -41,10 +41,6 @@
android:layout_height="48dip" android:layout_height="48dip"
android:layout_width="48dip" android:layout_width="48dip"
android:layout_toRightOf="@id/chip_wrapper" android:layout_toRightOf="@id/chip_wrapper"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:maxWidth="48dp"
android:maxHeight="48dp"
android:src="@drawable/ic_contact_picture" android:src="@drawable/ic_contact_picture"
style="?android:attr/quickContactBadgeStyleWindowLarge" style="?android:attr/quickContactBadgeStyleWindowLarge"
android:background="@android:color/transparent" /> android:background="@android:color/transparent" />

View File

@ -1850,6 +1850,12 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
if (holder.contactBadge != null) { if (holder.contactBadge != null) {
holder.contactBadge.assignContactFromEmail(counterpartyAddress, true); holder.contactBadge.assignContactFromEmail(counterpartyAddress, true);
if (counterpartyAddress != null) { 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); mContactsPictureLoader.loadContactPicture(counterpartyAddress, holder.contactBadge);
} else { } else {
holder.contactBadge.setImageResource(R.drawable.ic_contact_picture); holder.contactBadge.setImageResource(R.drawable.ic_contact_picture);