2
我可以檢索聯繫人姓名和電話,但是如何在一個查詢中檢索聯繫人照片?如何在SimpleCursorAdapter中綁定聯繫人姓名,電話和聯繫人照片?
String[] PROJECTION = new String[] { Contacts.People._ID, Contacts.PeopleColumns.NAME, Contacts.Phones.NUMBER };
Cursor c = a.managedQuery(Contacts.People.CONTENT_URI, PROJECTION, null, null, Contacts.People.DEFAULT_SORT_ORDER);
return (new SimpleCursorAdapter(a,
R.layout.list_row,
c,
new String[] { Contacts.PeopleColumns.NAME, Contacts.Phones.NUMBER },
new int[] { R.id.toptext, R.id.bottomtext }));