当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Multiple select number from contact list

问题描述:

I wanna make enable to choose multiple contact number from contact list

I use this code for call caontact list

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);

intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);

and on action result

 if (data != null) {

Uri uri = data.getData();

if (uri != null) {

Cursor c = null;

try {

c = getContentResolver()

.query(uri,

new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER },

null, null, null);

if (c != null && c.moveToFirst()) {

String tmp = c.getString(0);

}

but I just can select one number !

how can I make list of contact multiple selection ?

网友答案:

There is no such like multiple contact picker in Android SDK, instead we usually make a custom implementation (i.e. by making activity with listView). As said in this link, there's no such 'official' way to do this.

分享给朋友:
您可能感兴趣的文章:
随机阅读: