Overview
CometChatCreateGroup serves as a versatile Component, empowering users to create diverse group types, encompassing public, private, and password-protected options. This functionality grants users the flexibility to tailor their group settings to suit their preferences and requirements.

CometChatCreateGroup component is composed of the following BaseComponents:
Usage
Integration
CreateGroup, as a is a Composite Component, offers flexible integration options, allowing it to be launched directly via button clicks or any user-triggered action. Additionally, it seamlessly integrates into activities and fragments. With CreateGroup, users gain access to a wide range of parameters and methods for effortless customization of its user interface.
The following code snippet exemplifies how you can seamlessly integrate the CreateGroup component into your application.
CometChatCreateGroup can be launched by adding the following code snippet into XML layout file.
- XML
Activity and Fragment
You can integrateCometChatCreateGroup into your Activity and Fragment by adding the following code snippets into the respective classes.
- Java (Activity)
- Kotlin (Activity)
- Java (Fragment)
- Kotlin (Fragment)
YourActivity.java
CometChatCreateGroup is the custom view class that you want to set as the content of your activity or the view for your fragment. This will display the CometChat groups with messages in your activity or fragment.
Actions
Actions dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.1. SetOnCreateGroup
TheSetOnCreateGroup action is activated when you click the create Group button. This returns the created groups.
You can override this action using the following code snippet.
- Java
- Kotlin
2. SetOnError
You can customize this behavior by using the provided code snippet to override theOn Error and improve error handling.
- Java
- Kotlin
Filters
Filters allow you to customize the data displayed in a list within aComponent. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders of Chat SDK.
The CreateGroup component does not have any exposed filters.
Events
Events are emitted by aComponent. By using CometChatGroupEvents you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
Events emitted by the Create Group component is as follows.
Customization
To fit your app’s design requirements, you can customize the appearance of the Groups component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.Style
Using Style you can customize the look and feel of the component in your app, These parameters typically control elements such as the color, size, shape, and fonts used within the component.1. CreateGroup Style 🛑
You can set theCreateGroupStyle to the Create Group Component to customize the styling.
- Java
- Kotlin
CreateGroupStyle
Functionality
These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can change text, set custom icons, and toggle the visibility of UI elements.- Java
- Kotlin

CometChatCreateGroup
Advanced
For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your own views, layouts, and UI elements and then incorporate those into the component. TheCreate Group component does not provide additional functionalities beyond this level of customization.