¡@

Home 

2014/10/16 ¤W¤È 08:11:25

android Programming Glossary: contactphotouri

How do I load a contact Photo?

http://stackoverflow.com/questions/2383580/how-do-i-load-a-contact-photo

method I get a null value for the photo InputStream. It is also confusing because the URI values are different. The contactPhotoUri evaluates to content com.android.contacts contacts 1557 See the comments inline in the code below. class ContactAccessor.. return contactInfo returns info for contact public Bitmap getPhoto ContentResolver contentResolver Long contactId Uri contactPhotoUri ContentUris.withAppendedId Contacts.CONTENT_URI contactId contactPhotoUri content com.android.contacts contacts 1557 InputStream.. contentResolver Long contactId Uri contactPhotoUri ContentUris.withAppendedId Contacts.CONTENT_URI contactId contactPhotoUri content com.android.contacts contacts 1557 InputStream photoDataStream Contacts.openContactPhotoInputStream contentResolver..

Load contact photo in a listview performance

http://stackoverflow.com/questions/5211665/load-contact-photo-in-a-listview-performance

view.setTag viewHolder else viewHolder ViewHolder view.getTag ContactsBook cb mContacts.get position if cb null Uri contactPhotoUri ContentUris.withAppendedId Contacts.CONTENT_URI cb.getContactIndex BitmapDownloaderTask bdTask new BitmapDownloaderTask.. cb.getContactIndex BitmapDownloaderTask bdTask new BitmapDownloaderTask viewHolder.qcBadge bdTask.execute contactPhotoUri.toString viewHolder.qcBadge.assignContactUri contactPhotoUri viewHolder.qcBadge.setImageBitmap framePhoto BitmapFactory.decodeResource.. BitmapDownloaderTask viewHolder.qcBadge bdTask.execute contactPhotoUri.toString viewHolder.qcBadge.assignContactUri contactPhotoUri viewHolder.qcBadge.setImageBitmap framePhoto BitmapFactory.decodeResource getResources R.drawable.ic_contact_list_picture..