Methods | Parameters | Description |
---|---|---|
setTitle(String title) | String | Sets the title that will be displayed at the top of the CometChatContacts view. This method allows you to customize the title to provide relevant information or context to the users. |
setCloseButtonIcon(@DrawableRes int closeButtonIcon) | @DrawableRes int | Sets the icon that will be displayed as the close button in the CometChatContacts view. |
setCloseButtonVisibility(boolean showBackButton) | boolean | Sets the visibility of the back button in the CometChatContacts view. If set to true , the back button will be displayed, allowing users to navigate back to the previous screen. If set to false , the back button will be hidden. |
setSubmitIcon(@DrawableRes int submitIcon) | @DrawableRes int | Sets the icon that will be displayed as the submit icon in the CometChatContacts view. |
setSubmitIconVisibility(int value) | int | Sets the visibility of the submit icon in the CometChatContacts view. If set to View.VISIBLE , the submit icon will be visible, allowing users to submit their selections. If set to View.GONE , the submit icon will be hidden. |
setOnSubmitIconClick(OnSelection onSelection) | OnSelection | Sets the listener that will be triggered when the submit icon is clicked in the CometChatContacts view. The listener can be used to handle Contacts selection events, allowing users to perform actions based on the selected users and groups. |
setStyle(ContactsStyle style) | ContactsStyle | Sets various style configurations for the CometChatContacts view, including title appearance, font, color, background, border, tab colors, and more. |
setSelectionLimit(int limit) | int | Sets the selection limit for the CometChatContacts view. This method allows you to limit the number of users and groups that can be selected by the user in the Contacts view. Once the selection limit is reached, further selection of users and groups will be disabled. |
setSelectionMode(UIKitConstants.SelectionMode selectionMode) | UIKitConstants.SelectionMode | selectionMode is used to set the selection mode for the CometChatUsers and CometChatGroups subviews embedded inside CometChatContacts . |
setUsersTabTitle(String title) | String | Sets the title for the Users tab in the CometChatContacts view. This method allows you to customize the title displayed for the Users tab. |
setGroupsTabTitle(String title) | String | Sets the title for the Groups tab in the CometChatContacts view. This method allows you to customize the title displayed for the Groups tab. |
setOnItemClickListener(OnItemSelection selection) | OnItemSelection | Sets the listener to handle item selection events in the CometChatContacts view. This method allows you to register a callback to be notified when a user or group is selected by the user in the Contacts view. |
setUsersConfiguration(UsersConfiguration configuration) | UsersConfiguration | Sets the configuration for the Users tab in the CometChatContacts view. This method allows you to customize various aspects of the Users tab, such as search functionality, appearance and more. By passing a valid UsersConfiguration object, you can control how the Users tab behaves and appears to the users. |
setGroupsConfiguration(GroupsConfiguration configuration) | GroupsConfiguration | Sets the configuration for the Groups tab in the CometChatContacts view. This method allows you to customize various aspects of the Groups tab, such as search functionality, appearance and more. By passing a valid GroupsConfiguration object, you can control how the Groups tab behaves and appears to the users. |
Methods | Parameter | Description |
---|---|---|
setBackground(int background) | @ColorInt int | Sets the background color of the view. |
setBackground(Drawable drawableBackground) | Drawable | Sets the drawable background of the view. |
setCornerRadius(float cornerRadius) | float | Sets the corner radius of the view. |
setBorderWidth(int borderWidth) | @ColorInt int | Sets the width of the view’s border. |
setBorderColor(int borderColor) | @ColorInt int | Sets the color of the view’s border. |
setTitleTextColor(int titleTextColor) | @ColorInt int | Sets the title text color for the contacts-related UI elements. |
setBackIconTintColor(int backIconTintColor) | @ColorInt int | Sets the tint color for the back icon. |
setSelectIconTint(int selectIconTint) | @ColorInt int | Sets the tint color for the select icon. |
setTabSelectedTextColor(int tabSelectedTextColor) | @ColorInt int | Sets the text color for the selected tab. |
setTabTextColor(int tabTextColor) | @ColorInt int | Sets the text color for the tabs. |
setTabIndicatorColor(int tabIndicatorColor) | @ColorInt int | Sets the color for the tab indicator. |
setTabBackgroundTint(int tabBackgroundTint) | @ColorInt int | Sets the tint color for the tab background. |
setTabBackground(Drawable tabBackground) | Drawable | Sets the drawable resource for the tab background. |
setTabBackgroundState(Drawable tabBackgroundState) | Drawable | Sets the drawable resource for the tab background state. |
setTitleTextFont(String titleTextFont) | String | Sets the font for the title text. |
setTitleTextAppearance(@StyleRes int titleTextAppearance) | @ColorInt int | Sets the text appearance for the title text. |