开发者

Open contact list to pick contact, or add a new one

In my application I need to pick a contact using the default contact application. I do that using:

Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);

startActivityForResult(intent, PICK_CONTACT);

But i'm missing the "Create New" button, which is there on the top. How can开发者_开发问答 I get it?


You can't, this is not possible. The only way is to create yourself the "ContactPickerActivity" so you can add what you want in it and for example your "Add a contact" button.

In your sample folder (samples/android-XX/ApiDemos/src/com/example/android/apis/app/LoaderCursor) you have a great exemple of how to achieve it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜