用途:这是 CometChat Android UI Kit v5 组件名称、关键方法与用法的唯一参考来源。在编写任何 CometChat 视图代码前应先查阅本目录;未列出的组件即不存在。
主要能力:核心消息组件包括 CometChatConversations(会话列表)、CometChatMessageList(消息列表)、CometChatMessageComposer(输入与发送)、CometChatMessageHeader(会话头部)。列表组件有 CometChatUsers、CometChatGroups、CometChatGroupMembers。通话组件有 CometChatCallLogs、CometChatIncomingCall、CometChatOutgoingCall、CometChatOngoingCall。其他组件含 CometChatSearch、CometChatReactionList、CometChatThreadHeader。共享视图包括 CometChatAvatar、CometChatBadge、CometChatStatusIndicator、CometChatMessageReceipt、CometChatDate、CometChatMessageBubble、CometChatEmojiKeyboard、CometChatConfirmDialog、CometChatPopupMenu。
使用方式:所有组件继承 MaterialCardView,可用于 XML 布局或代码创建。典型模式为设置 User 或 Group 对象,通过 setter 配置可见性与样式,并附加回调。例如在 XML 中声明 com.cometchat.chatuikit.conversations.CometChatConversations,再在 Java/Kotlin 中 findViewById 后调用 setOnItemClick。消息界面常组合 header、messageList、composer 三者。
适用场景:编写使用 CometChat* 视图的代码、查询组件名称/方法/XML 属性、组合多个组件(如消息头+列表+输入框)。
限制与硬性规则:不得臆造组件名;setUser() 与 setGroup() 互斥,只能设其一;组件需已登录用户,挂载前应确认 CometChatUIKit.getLoggedInUser() != null;线程模式需 CometChatMessageList.setParentMessage(long) 与 CometChatMessageComposer.setParentMessageId(long) 指向同一父消息 ID。初始化/登录、主题定制、自定义消息模板应分别使用 cometchat-android-v5-core、cometchat-android-v5-theming、cometchat-android-v5-customization 技能。具体安装命令与版本信息暂未提供。