我正在尝试将我的联系人加载到 ListView中。我不知道从哪里开始,所以我搜索了 www 并找到了一些示例。其中之一(https://github.com/codepath/android_guides/wiki/Loading-Contacts-with-Content-Providers)很好地描述了这种方法。现在我根本不明白,这个标签是干什么用的。
我试图重现该示例并使用
CharSequence mailType = ContactsContract.CommonDataKinds.Email.getTypeLabel(context.getResources(), type, null);
代替
CharSequence emailType = ContactsContract.CommonDataKinds.Email.getTypeLabel(context.getResources(), type, customLabel);
正如示例中所示,每一个对我来说似乎都很好。那么这个标签是干什么用的呢?
提前致谢!