群设置

下文将向您展示如何隐藏群设置选项及其效果。

隐藏群设置选项

API 作用:隐藏群组设置选项。针对所有群组生效。
API 原型:
// TUIGroupConfig.java
public static final int MUTE_AND_PIN = 1; public static final int MANAGE = 2; public static final int ALIAS = 3; public static final int BACKGROUND = 4; public static final int MEMBERS = 5; public static final int CLEAR_CHAT_HISTORY = 6; public static final int DELETE_AND_LEAVE = 7; public static final int TRANSFER = 8; public static final int DISMISS = 9; @IntDef({MUTE_AND_PIN, MANAGE, ALIAS, BACKGROUND, MEMBERS, CLEAR_CHAT_HISTORY, DELETE_AND_LEAVE, TRANSFER, DISMISS}) public @interface Items {}

/**
* Hide items in group config interface.
*/
public static void hideItemsInGroupConfig(@Items int... items)
示例代码:
// When to call: Before initializing group setting interface.
TUIGroupConfig.hideItemsInGroupConfig(TUIGroupConfig.MUTE_AND_PIN,
TUIGroupConfig.MANAGE);
设置效果:
隐藏部分选项
隐藏全部选项
默认