摘要: import android.app.Activity; import android.content.Context; import android.support.annotation.Nullable; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import ... 阅读全文
posted @ 2018-04-28 15:21 Emerys 阅读(179) 评论(0) 推荐(0) 编辑
摘要: private static final String COLUMN_CONTACT_ID = ContactsContract.Data.CONTACT_ID; private static final String COLUMN_RAW_CONTACT_ID = ContactsContract.Data.RAW_CONTACT_ID; private static ... 阅读全文
posted @ 2018-04-28 10:28 Emerys 阅读(164) 评论(0) 推荐(0) 编辑
摘要: public Uri getContactUri(String contactId, Context context) { if (context == null || contactId == null) { return null; } //获取联系人信息的Uri Uri uri = Contact... 阅读全文
posted @ 2018-04-28 10:15 Emerys 阅读(307) 评论(0) 推荐(0) 编辑
摘要: /** * @brief 显示联系人编辑界面 * */ public void editContact(String contactId,Context context) { if (context == null || contactId == null) { return ; } ... 阅读全文
posted @ 2018-04-28 10:13 Emerys 阅读(267) 评论(0) 推荐(0) 编辑
摘要: /** * 删除联系人 * */ public void deleteContact(Contact contact) { Log.w(TAG, "**delete start**"); ArrayList ops = new ArrayList(); String id = getContactID(contact.... 阅读全文
posted @ 2018-04-28 10:10 Emerys 阅读(387) 评论(0) 推荐(0) 编辑
摘要: /** * @brief 新建联系人显示编辑界面 * */ public void insertContact(Contact contact,Context context) { if (context == null) { return; } Intent intent = new Int... 阅读全文
posted @ 2018-04-28 10:08 Emerys 阅读(305) 评论(0) 推荐(0) 编辑
摘要: /** * 姓名中含有特殊字符的查找不到 * */ public String getContactID(String name) { String id = "0"; Uri uri = ContactsContract.Contacts.CONTENT_URI; String [] projection = new ... 阅读全文
posted @ 2018-04-28 09:47 Emerys 阅读(1082) 评论(0) 推荐(0) 编辑