Skip to main content
Version: v3

Customize UI Kit

This guide helps you to customize, modify, and enable/disable features present in UIKit.

note

CometChat SDK & UI Kit both need to be configured before starting the customization in UI Kit.

To Modify and customize UI Kit, you need to refer to the UIKitSettings class present in the UI Kit Library. You will be easily able to modify the color, enable/disable some of the features which you won't require in your app.

Important
  • UI Kit Settings must be called before launching any UI Screen or UI Unified. By default, all settings will be enabled.
  • For advanced level customization, you can modify the source code of the library as per your requirement.

1. Color Settings

DescriptionCode SnippetSettings
Modify primary colourUIKitSettings.setColor(String color)Requires Hex value of color as String

Ex: "#F3F3F3"

2. Tab bar settings

DescriptionCode SnippetSettings
Hide/Show recents chats tabUIKitSettings.conversations(true)You can show it using true or hide it using false.
Hide/Show calls tabUIKitSettingscalls(true)You can show it using true or hide it using false.
Hide/Show users tabUIKitSettings.users(true)You can show it using true or hide it using false.
Hide/Show groups tabUIKitSettings.groups(true)You can show it using true or hide it using false.
Hide/Show user information tabUIKitSettings.userSettings(true)You can show it using true or hide it using false.

3. Call settings

DescriptionCode SnippetSettings
Enable audio call for userUIKitSettings.userAudioCall(true)You can enable it using true or disable it using false.
Enable video call for userUIKitSettings.userVideoCall(true)You can enable it using true or disable it using false.
Enable video call for groupUIKitSettings.groupVideoCall(true)You can enable it using true or disable it using false.
Enable sound for callsUIKitSettings.enableSoundForCalls(true)You can enable it using true or disable it using false.
Show action messages for calls.UIKitSettings.callNotification(true)You can show it using true or hide it using false.

4. User settings

DescriptionCode SnippetSettings
Show users-conversations/group-conversation onlyUIKitSettings.setConversationsMode(ConversationMode conversationMode)You can use below constants.
- ConversationMode.ALL_CHATS
- ConversationMode.GROUP
- ConversationMode.USER
Show all-users/friendsUIKitSettings.setUsersMode(UserMode mode)You can use below constants.
- UserMode.ALL_USER
- UserMode.FRIENDS`
Show all-groups/password-protected groups/public-groupsUIKitSettings.setGroupsMode(GroupMode mode)You can use below constants.
- GroupMode.ALL_GROUPS
- GroupMode.PUBLIC_GROUP`
Show user presenceUIKitSettings.userPresence(true)You can show it using true or hide it using false.
Allow Users to blockUIKitSettings. blockUser(true)You can allow it using true or disallow it using false.

5. Group settings

DescriptionCode SnippetSettings
Show create groupUIKitSettings.groupCreate(true)You can show it using true or hide it using false.
Show join or leave groupUIKitSettings. joinOrLeaveGroup(true)You can show it using true or hide it using false.
Show delete groupUIKitSettings.allowDeleteGroups(true)You can show it using true or hide it using false.
Show group membersUIKitSettings.viewGroupMembers(true)You can show it using true or hide it using false.
Show add memberUIKitSettings.allowAddMembers(true)You can show it using true or hide it using false.
Allow moderator to delete messages of participantsUIKitSettings.allowModeratorToDeleteMemberMessages(true)You can allow it using true or disallow it using false.
Allow user to kick membersUIKitSettings.kickMember(true)You can allow it using true or disallow it using false.
Allow user to ban membersUIKitSettings.banMember(true)You can allow it using true or disallow it using false.
Allow user to promote or demote membersUIKitSettings.allowPromoteDemoteMembers(true)You can allow it using true or disallow it using false.
Show group action messages in groups.UIKitSettings.groupNotifications(true)You can show it using true or hide it using false.

6. Message settings

DescriptionCode SnippetSettings
Allow send messageUIKitSettings.allowSendingMessages(true)You can allow it using true or disallow it using false.
Allow send photos & videosUIKitSettings.sendPhotosVideo(true)You can allow it using true or disallow it using false.
Allow send files & documentsUIKitSettings.sendFiles(true)You can allow it using true or disallow it using false.
Allow send voice notesUIKitSettings.sendVoiceNotes(true)You can allow it using true or disallow it using false.
Allow send emojis from keyboardUIKitSettings.sendEmojis(true)You can allow it using true or disallow it using false.
Allow send emojis in Larger SizeUIKitSettings.sendEmojisInLargeSize(true)You can allow it using true or disallow it using false.
Show typing indicatorUIKitSettings.sendTypingIndicators(true)You can show it using true or hide it using false.
Ability to edit the messageUIKitSettings.editMessage(true)You can allow it using true or disallow it using false.
Ability to delete the messageUIKitSettings.deleteMessage(true)You can allow it using true or disallow it using false.
Ability to share, copy & forward the messageUIKitSettings.shareCopyForwardMessage(true)You can allow it using true or disallow it using false.
Ability to reply on messageUIKitSettings.replyingToMessage(true)You can allow it using true or disallow it using false.
Ability to start new thread for messageUIKitSettings.threadedChats(true)You can allow it using true or disallow it using false.
Ability to share live reactionUIKitSettings.sendLiveReaction(true)You can enable it using true or disable it using false.
Ability to share your locationUIKitSettings.shareLocation(true)You can allow it using true or disallow it using false.
Show shared mediaUIKitSettings.viewSharedMedia(true)You can show it using true or hide it using false.
Show read/delivery receipts for MessagesUIKitSettings.showReadDeliveryReceipts(true)You can show it using true or hide it using false.
Ability to create poll (Poll Extension must be enabled from Dashboard)UIKitSettings.sendPolls(true)You can allow it using true or disallow it using false.
Enable Message ReactionsUIKitSettings.sendMessageReaction(true)You can enable it using true or disable it using false.
Enable Collaborative DocumentUIKitSettings.collaborativeWhiteBoard(true)You can enable it using true or disable it using false.
Enable Collaborative WhiteboardUIKitSettings.collaborativeDocument(true)You can enable it using true or disable it using false.