Skip to main content
Version: v4

Message Input

CometChatMessageInput is a component that provides a skeleton layout for contents of like TextField, auxiliary options, primary button view and attachment options.

Methods

MethodsTypeDescription
setTextStringinitial text for the input field
setPlaceHolderTextStringsets hint text for the input field
setOnTextChangedListenerFunction(String)callback to handle change in value of text in the input field
setStyleMessageInputStyleprovides style to this widget
setMaxLineintmaximum lines allowed to increase in the input field
setSecondaryButtonViewWidgetadditional ui component apart from primary
setAuxiliaryButtonViewWidgetadditional ui component apart from primary and secondary
setPrimaryButtonViewWidgeta ui component that would trigger basic functionality
setAuxiliaryButtonAlignmentAuxiliaryButtonsAlignmentcontrols position auxiliary button view

MessageInputStyle

MessageInputStyle helps to customize CometChatMessageInput

MethodsTypeDescription
setBorderWidthintused to set border
setCornerRadiusfloatused to set border radius
setBackground@ColorInt

int
used to set the background color
setInputBackground@ColorInt

int
Used to set the input text Background color
setBackgroundDrawableused to set background drawable
setInputTextAppearanceTextStyleused to set input text style
setPlaceHolderColorTextStyleused to set text color of the hint text
setSeparatorTint@ColorInt

int
used to set color to the divider separating input field and bottom bar