Contact Settings
The following will guide you through how to hide the contact setting options.
Hide contact setting options
API Function: Hide Contact Settings Options. This setting is effective for all contacts.
API prototype:
// TUIContactConfigMinimalist.javapublic 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 {}/*** Hide items in contact config interface.*/public static void hideItemsInContactConfig(@Items int... items)
Sample code:
// When to call: Before initializing contact setting interface.// Valid for contacts.TUIContactConfigMinimalist.hideItemsInContactConfig(TUIContactConfigMinimalist.BLOCK,TUIContactConfigMinimalist.CLEAR_CHAT_HISTORY,TUIContactConfigMinimalist.DELETE);// Valid for strange users who have not been added to the contact.TUIContactConfigMinimalist.hideItemsInContactConfig(TUIContactConfigMinimalist.ADD_FRIEND);
Result of Contact Settings:
Hide Partial Options | Hide All Options | Default |
| | |
Result of Users Not Yet Added to Contacts:
Hide Adding Friends | Default |
| |