Question

I'm trying to add a QuickContactBadge to a listview, it works fine and is clickable but currently shows no image, i'm sure there is a way to get it to display the contact's image but I'm not sure how. Can anyone help?

My code is:

    <QuickContactBadge android:id="@+id/contact"
    android:layout_width="54dp" android:layout_height="54dp"></QuickContactBadge>

and

    QuickContactBadge badgeSmall = (QuickContactBadge)messageView.findViewById(R.id.contact);  
    badgeSmall.assignContactFromEmail(message1.geteMail(), true);  
    badgeSmall.setMode(ContactsContract.QuickContact.MODE_SMALL);
Was it helpful?

Solution

Checkout this tutorial. I think that what you need to make sure you do is that your cursor has the PHOTO_ID column included.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top