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:
Components | Description |
---|---|
CometChatListBase | CometChatListBase serves as a comprehensive container component, encompassing essential elements such as a title (navigationBar), search functionality (search-bar), background, and a container to embed a list view. This design provides a cohesive and intuitive user experience, facilitating seamless navigation and interaction within the component. |
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.
CometChatCreateGroup
into your Activity and Fragment by adding the following code snippets into the respective classes.
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.
SetOnCreateGroup
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.
On Error
and improve error handling.
Component
. 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.
Component
. 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.
Event | Description |
---|---|
ccGroupCreated(Group group) | This event will be triggered when the logged-in user initiates the creation of a group. |
CreateGroupStyle
to the Create Group
Component to customize the styling.
CreateGroupStyle
Property | Description | Code |
---|---|---|
Active Background | Sets the active background color. | setActiveBackground(int activeBackground) |
Back Icon Tint Color | Tint color for the back icon. | setBackIconTintColor(int backIconTintColor) |
Border Color | Sets the border color. | setBorderColor(int borderColor) |
Border Width | Sets the border width. | setBorderWidth(int borderWidth) |
Corner Radius | Sets the corner radius. | setCornerRadius(float cornerRadius) |
Create Group Icon Tint | Tint color for the create group icon. | setCreateGroupIconTint(int createGroupIconTint) |
Edit Text Background Color | Background color for the edit text. | setEditTextBackgroundColor(int editTextBackgroundColor) |
Edit Text Corner Radius | Corner radius for the edit text. | setEditTextCornerRadius(int editTextCornerRadius) |
Place Holder Text Color | Text color for the placeholder. | setPlaceHolderTextColor(int placeHolderTextColor) |
Tab Background | Background drawable for the tab. | setTabBackground(Drawable tabBackground) |
Tab Background State | Background drawable state for the tab. | setTabBackgroundState(Drawable tabBackgroundState) |
Tab Background Tint | Tint color for the tab background. | setTabBackgroundTint(int tabBackgroundTint) |
Tab Indicator Color | Color of the tab indicator. | setTabIndicatorColor(int tabIndicatorColor) |
Tab Selected Text Color | Text color for the selected tab. | setTabSelectedTextColor(int tabSelectedTextColor) |
Tab Text Color | Text color for the tab. | setTabTextColor(int tabTextColor) |
Text Appearance | Text appearance style. | setTextAppearance(int textAppearance) |
Text Font | Font for the text. | setTextFont(String textFont) |
Title Text Appearance | Text appearance style for the title. | setTitleTextAppearance(int titleTextAppearance) |
Title Text Color | Text color for the title. | setTitleTextColor(int titleTextColor) |
Title Text Font | Font for the title text. | setTitleTextFont(String titleTextFont) |
CometChatCreateGroup
Property | Description | Code |
---|---|---|
Back Button Icon | Sets the icon for the back button. | setCloseButtonIcon(Drawable backButtonIcon) |
Back Icon Tint | Tint color for the back icon. | backIconTint(int backIconTint) |
Background Color | Background color for the component. | setBackground(int backgroundColor) |
Create Group Icon | Sets the icon for the create group button. | setCreateGroupIcon(Drawable createGroupIcon) |
Create Group Icon Tint | Tint color for the create group icon. | setCreateGroupIconTint(int createGroupIconTint) |
Edit Text Background | Background color for the edit text. | setEditTextBackground(@ColorInt int EditTextBoxColor) |
Edit Text Border Color | Border color for the edit text. | setEditTextBorderColor(@ColorInt int color) |
Edit Text Border Width | Border width for the edit text. | setEditTextBorderWidth(int width) |
Edit Text Corner Radius | Corner radius for the edit text. | setEditTextCornerRadius(float EditTextBoxRadius) |
Edit Text Placeholder Color | Placeholder text color for the edit text. | setEditTextPlaceHolderColor(@ColorInt int color) |
Edit Text Placeholder Text | Placeholder text for the edit text. | setPasswordInputBoxPlaceHolderText(String placeHolderText) |
Edit Text Text Appearance | Text appearance style for the edit text. | setEditTextTextAppearance(int appearance) |
Edit Text Text Color | Text color for the edit text. | setEditTextTextColor(@ColorInt int color) |
Edit Text Text Font | Font for the edit text. | setEditTextTextFont(String fontName) |
Icon | ImageView for the icon. | setCreateGroupIcon(Drawable icon) |
Name Input Box | TextInputLayout for the name input. | nameInputBox.setBoxCornerRadii(EditTextBoxRadius, EditTextBoxRadius, EditTextBoxRadius, EditTextBoxRadius) |
On Create Group | Callback interface for group creation. | setOnCreateGroup(OnCreateGroup onCreateGroup) |
On Error | Callback interface for error handling. | setOnError(OnError onError) |
Password Input Box | TextInputLayout for the password input. | passwordInputBox.setBoxCornerRadii(EditTextBoxRadius, EditTextBoxRadius, EditTextBoxRadius, EditTextBoxRadius) |
Password Input Box Placeholder Text | Placeholder text for the password input box. | setPasswordInputBoxPlaceHolderText(String placeHolderText) |
Password Input Box Start Icon | Start icon for the password input box. | setPasswordInputBoxStartIcon(int res) |
Password Input Box Start Icon Tint | Tint color for the start icon in the password input box. | setPasswordInputBoxStartIconTint(@ColorInt int color) |
Show Back Button | Flag to show or hide the back button. | showBackButton = boolean |
Tab Background | Background drawable for the tab. | setTabBackground(Drawable tabBackground) |
Tab Background State | Background drawable state for the tab. | setTabBackgroundState(Drawable tabBackgroundState) |
Tab Background Tint | Tint color for the tab background. | setTabBackgroundTint(int tabBackgroundTint) |
Tab Indicator Color | Color of the tab indicator. | setTabIndicatorColor(int tabIndicatorColor) |
Tab Layout | TabLayout for the component. | setTabs() |
Tab Selected Text Color | Text color for the selected tab. | setTabSelectedTextColor(int tabSelectedTextColor) |
Tab Text Color | Text color for the tab. | setTabTextColor(int tabTextColor) |
Tabs List | List of tabs in the component. | tabs_List.remove(getResources().getString(string.cometchat_type_public)) |
Theme | Theme for the component. | CometChatTheme theme |
Title | Title for the component. | title = String |
Title Color | Color of the title text. | super.setTitleColor(int titleColor) |
Title Text Appearance | Text appearance style for the title. | super.setTitleAppearance(style.getTitleTextAppearance()) |
Title Text Font | Font for the title text. | super.setTitleFont(style.getTitleTextFont()) |
Create Group
component does not provide additional functionalities beyond this level of customization.