全部文档

更新时间: 2021-03-08

# 功能描述

# 参数说明

参数 类型 必填 说明
listener ConversationListBehaviorListener 监听回调

# 示例代码

 RongIM.setConversationListBehaviorListener(new RongIM.ConversationListBehaviorListener() {
    /**
     * 会话头像点击监听
     *
     * @param context          上下文。
     * @param conversationType 会话类型。
     * @param targetId         被点击的用户id。
     * @return  true 拦截事件, false 执行融云 SDK 内部默认处理逻辑
     */
    @Override
    public boolean onConversationPortraitClick(Context context, Conversation.ConversationType conversationType, String targetId) {
        return false;
    }
    /**
     * 会话头像长按监听
     *
     * @param context          上下文。
     * @param conversationType 会话类型。
     * @param targetId         被点击的用户id。
     * @return true 拦截事件, false 执行融云 SDK 内部默认处理逻辑
     */
    @Override
    public boolean onConversationPortraitLongClick(Context context, Conversation.ConversationType conversationType, String targetId) {
        return false;
    }

    /**
     * 会话列表中的 Item 长按监听
     *
     * @param context      上下文。
     * @param view         触发点击的 View。
     * @param conversation 长按时的会话条目
     * @return true 拦截事件, false 执行融云 SDK 内部默认处理逻辑
     */
    @Override
    public boolean onConversationLongClick(Context context, View view, UIConversation conversation) {
        return false;
    }
    /**
     * 会话列表中的 Item 点击监听
     *
     * @param context      上下文。
     * @param view         触发点击的 View。
     * @param conversation 长按时的会话条目
     * @return true 拦截事件, false 执行融云 SDK 内部默认处理逻辑
     */
    @Override
    public boolean onConversationClick(Context context, View view, UIConversation conversation) {
        return false;
    }
});
已复制
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

文档是否解决您的问题 ?

如果遇到产品相关问题,您可 提交工单 寻求帮助