public static final class ContactsContract.PinnedPositions
extends Object
| java.lang.Object | |
| android.provider.ContactsContract.PinnedPositions | |
关于联系人是否被系统联系人应用程序的用户界面中的特定位置处的用户固定的联系人特定信息。
这个固定信息可以被各个应用程序用来定制他们如何订购特定的固定联系人。 例如,拨号器应用程序可以使用固定的信息来订购顶部一行收藏夹中的用户固定联系人。
两个或多个联系人可能占用相同的固定位置(由于聚合和同步),所以应尽量使用此固定信息来在应用程序中排序联系人,而不是绝对指导联系人的联系方式应该定位。 由ContactsProvider返回的联系人将不会根据此信息进行排序,因此客户端应用程序需要在自己的UI中重新排序这些联系人,以遵守(或适当忽略)存储在固定列中的信息。
默认情况下, UNPINNED固定的联系人的固定位置为UNPINNED 。 客户端提供的固定位置可以是大于1的正整数。
常量(Constants) |
|
|---|---|
int |
DEMOTED 用户指定的联系人的固定位置值应被视为最低优先级。 |
int |
UNPINNED 未锁定联系人的固定位置的默认值。 |
Public constructors |
|
|---|---|
ContactsContract.PinnedPositions() |
|
公共方法(Public methods) |
|
|---|---|
static void |
pin(ContentResolver contentResolver, long contactId, int pinnedPosition) 在提供的位置插入一个联系人,或者取消联系。 |
static void |
undemote(ContentResolver contentResolver, long contactId) 谴责以前降级的联系人。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
int DEMOTED
用户指定的联系人的固定位置值应被视为最低优先级。 客户端应用程序需要确定如何呈现此类联系人 - 例如一直位于联系人列表的底部,或者只是隐藏在视图中。
常量值:-1(0xffffffff)
void pin (ContentResolver contentResolver, long contactId, int pinnedPosition)
在提供的位置插入一个联系人,或者取消联系。
| 参数(Parameters) | |
|---|---|
contentResolver |
ContentResolver: to perform the pinning operation on. |
contactId |
long
|
pinnedPosition |
int: the position to pin the contact at. To unpin a contact, use UNPINNED. |
void undemote (ContentResolver contentResolver, long contactId)
谴责以前降级的联系人。 如果联系人之前未降级,则不会执行任何操作。
| 参数(Parameters) | |
|---|---|
contentResolver |
ContentResolver: to perform the undemote operation on. |
contactId |
long: the id of the contact to undemote. |