联系人

最近更新时间:2024-10-30 10:24:32

我的收藏
下文将向您展示如何隐藏联系人设置选项及其效果。

隐藏联系人设置选项

API 作用:隐藏联系人设置选项。针对所有联系人生效。
API 原型:
// TUIContactConfigClassic.java
public static final int ALIAS = 1; public static final int MUTE_AND_PIN = 2; public static final int BACKGROUND = 3; public static final int BLOCK = 4; public static final int CLEAR_CHAT_HISTORY = 5; public static final int DELETE = 6; public static final int ADD_FRIEND = 7; @IntDef({ALIAS, MUTE_AND_PIN, BACKGROUND, BLOCK, CLEAR_CHAT_HISTORY, DELETE, ADD_FRIEND}) private @interface Items {}
示例代码:
// When to call: Before initializing contact setting interface.
// Valid for contacts.
TUIContactConfigClassic.hideItemsInContactConfig(TUIContactConfigClassic.BLOCK,
TUIContactConfigClassic.CLEAR_CHAT_HISTORY,
TUIContactConfigClassic.DELETE);
// Valid for strange users who have not been added to the contact.
TUIContactConfigClassic.hideItemsInContactConfig(TUIContactConfigClassic.ADD_FRIEND);
对联系人设置效果:
隐藏部分选项
隐藏全部选项
默认