Przeglądaj źródła

增加腾讯IM分享直播和分享曲目自定义消息

Pq 2 lat temu
rodzic
commit
e7e8d9b2a0

+ 32 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/adapter/ItemMarkAdapter.java

@@ -0,0 +1,32 @@
+package com.cooleshow.chatmodule.adapter;
+
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.chatmodule.R;
+
+import java.util.List;
+
+
+
+/**
+ * 创建日期:2022/5/23 11:54
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class ItemMarkAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
+
+    public ItemMarkAdapter(List<String> data) {
+        super(R.layout.layout_mark_item, data);
+    }
+
+
+    @Override
+    protected void convert(BaseViewHolder helper, String item) {
+        TextView tv_content = helper.getView(R.id.tv_content);
+        tv_content.setText(item);
+    }
+
+}

+ 9 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/constants/TCMessageConstants.java

@@ -0,0 +1,9 @@
+package com.cooleshow.chatmodule.constants;
+
+/**
+ * Author by pq, Date on 2023/8/9.
+ */
+public class TCMessageConstants {
+    public static final String TC_CHAT_SHARE_LIVE_MSG_TAG="TC_CHATSHARE_LIVE";//分享直播消息标识
+    public static final String TC_CHAT_SHARE_MUSIC_MSG_TAG="TC_CHATSHARE_MUSIC";//分享曲目消息标识
+}

+ 78 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/message/bean/TUIChatShareLiveMessageBean.java

@@ -0,0 +1,78 @@
+package com.cooleshow.chatmodule.message.bean;
+
+import android.text.SpannableString;
+
+import com.tencent.imsdk.v2.V2TIMMessage;
+import com.tencent.qcloud.tuikit.timcommon.bean.TUIMessageBean;
+
+import org.json.JSONObject;
+
+/**
+ * Author by pq, Date on 2023/8/9.
+ */
+public class TUIChatShareLiveMessageBean extends TUIMessageBean {
+    private String roomUID;
+    private String teacherAvatar;
+    private String teacherName;
+    private String liveDescMessage;
+
+    public String getRoomUID() {
+        return roomUID;
+    }
+
+    public void setRoomUID(String roomUID) {
+        this.roomUID = roomUID;
+    }
+
+    public String getTeacherAvatar() {
+        return teacherAvatar;
+    }
+
+    public void setTeacherAvatar(String teacherAvatar) {
+        this.teacherAvatar = teacherAvatar;
+    }
+
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+
+    public String getLiveDescMessage() {
+        return liveDescMessage;
+    }
+
+    public void setLiveDescMessage(String liveDescMessage) {
+        this.liveDescMessage = liveDescMessage;
+    }
+
+    @Override
+    public String onGetDisplayString() {
+        return "[直播分享]";
+    }
+
+    @Override
+    public void onProcessMessage(V2TIMMessage v2TIMMessage) {
+        String data = new String(v2TIMMessage.getCustomElem().getData());
+        try {
+            JSONObject jsonObject = new JSONObject(data);
+            if (jsonObject.has("roomUID")) {
+                roomUID = jsonObject.optString("roomUID");
+            }
+            if (jsonObject.has("teacherAvatar")) {
+                teacherAvatar = jsonObject.optString("teacherAvatar");
+            }
+            if (jsonObject.has("teacherName")) {
+                teacherName = jsonObject.optString("teacherName");
+            }
+            if (jsonObject.has("liveDescMessage")) {
+                liveDescMessage = jsonObject.optString("liveDescMessage");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+}

+ 112 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/message/bean/TUIChatShareMusicMessageBean.java

@@ -0,0 +1,112 @@
+package com.cooleshow.chatmodule.message.bean;
+
+import com.tencent.imsdk.v2.V2TIMMessage;
+import com.tencent.qcloud.tuikit.timcommon.bean.TUIMessageBean;
+
+import org.json.JSONObject;
+
+/**
+ * Author by pq, Date on 2023/8/9.
+ */
+public class TUIChatShareMusicMessageBean extends TUIMessageBean {
+    private String songName;
+    private String chargeType;
+    private String songAuth;
+    private String teacherAvatar;
+    private String teacherName;
+    private String musicTagNames;
+    private String songId;
+
+    public String getSongName() {
+        return songName;
+    }
+
+    public void setSongName(String songName) {
+        this.songName = songName;
+    }
+
+    public String getChargeType() {
+        return chargeType;
+    }
+
+    public void setChargeType(String chargeType) {
+        this.chargeType = chargeType;
+    }
+
+    public String getSongAuth() {
+        return songAuth;
+    }
+
+    public void setSongAuth(String songAuth) {
+        this.songAuth = songAuth;
+    }
+
+    public String getTeacherAvatar() {
+        return teacherAvatar;
+    }
+
+    public void setTeacherAvatar(String teacherAvatar) {
+        this.teacherAvatar = teacherAvatar;
+    }
+
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+
+    public String getMusicTagNames() {
+        return musicTagNames;
+    }
+
+    public void setMusicTagNames(String musicTagNames) {
+        this.musicTagNames = musicTagNames;
+    }
+
+    public String getSongId() {
+        return songId;
+    }
+
+    public void setSongId(String songId) {
+        this.songId = songId;
+    }
+
+    @Override
+    public String onGetDisplayString() {
+        return "[曲谱分享]";
+    }
+
+    @Override
+    public void onProcessMessage(V2TIMMessage v2TIMMessage) {
+        String data = new String(v2TIMMessage.getCustomElem().getData());
+        try {
+            JSONObject jsonObject = new JSONObject(data);
+            if (jsonObject.has("songName")) {
+                songName = jsonObject.optString("songName");
+            }
+            if (jsonObject.has("chargeType")) {
+                chargeType = jsonObject.optString("chargeType");
+            }
+            if (jsonObject.has("songAuth")) {
+                songAuth = jsonObject.optString("songAuth");
+            }
+            if (jsonObject.has("teacherAvatar")) {
+                teacherAvatar = jsonObject.optString("teacherAvatar");
+            }
+            if (jsonObject.has("teacherName")) {
+                teacherName = jsonObject.optString("teacherName");
+            }
+            if (jsonObject.has("musicTagNames")) {
+                musicTagNames = jsonObject.optString("musicTagNames");
+            }
+            if (jsonObject.has("songId")) {
+                songId = jsonObject.optString("songId");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+}

+ 72 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/message/holder/TUIChatShareLiveMessageHolder.java

@@ -0,0 +1,72 @@
+package com.cooleshow.chatmodule.message.holder;
+
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.common.BaseApplication;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.chatmodule.R;
+import com.cooleshow.chatmodule.message.bean.TUIChatShareLiveMessageBean;
+import com.tencent.qcloud.tuikit.timcommon.bean.TUIMessageBean;
+import com.tencent.qcloud.tuikit.timcommon.classicui.widget.message.MessageContentHolder;
+
+/**
+ * Author by pq, Date on 2023/8/9.
+ */
+public class TUIChatShareLiveMessageHolder extends MessageContentHolder {
+    public TUIChatShareLiveMessageHolder(View itemView) {
+        super(itemView);
+    }
+
+    @Override
+    public int getVariableLayout() {
+        return R.layout.rc_chat_share_live;
+    }
+
+    @Override
+    public void layoutVariableViews(TUIMessageBean msg, int position) {
+        if (msg instanceof TUIChatShareLiveMessageBean) {
+            TUIChatShareLiveMessageBean liveMessage = (TUIChatShareLiveMessageBean) msg;
+            //头像
+            ImageView iv_avatar = itemView.findViewById(R.id.iv_avatar);
+            GlideUtils.INSTANCE.loadImage(itemView.getContext(), liveMessage.getTeacherAvatar(), iv_avatar, R.drawable.icon_teacher_default_head);
+            //名称提示
+            String name = "老师";
+            if (!TextUtils.isEmpty(liveMessage.getTeacherName())) {
+                name = liveMessage.getTeacherName();
+            }
+            //直播间介绍
+            TextView tv_name_tip = itemView.findViewById(R.id.tv_name_tip);
+            TextView tv_content = itemView.findViewById(R.id.tv_content);
+            tv_name_tip.setText(itemView.getContext().getString(R.string.live_name_tip, name));
+            if (!TextUtils.isEmpty(liveMessage.getLiveDescMessage())) {
+                tv_content.setText(liveMessage.getLiveDescMessage());
+            } else {
+                tv_content.setText("暂无直播间介绍");
+            }
+            msgContentFrame.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (TextUtils.isEmpty(liveMessage.getRoomUID())) {
+                        return;
+                    }
+                    if (BaseApplication.Companion.isTeacherClient()) {
+                        ARouter.getInstance().build(RouterPath.LiveCenter.ACTIVITY_LIVE_ROOM_TEACHER)
+                                .withString("roomid_key", liveMessage.getRoomUID())
+                                .navigation();
+                    } else {
+                        ARouter.getInstance().build(RouterPath.LiveCenter.ACTIVITY_LIVE_ROOM)
+                                .withString("roomid_key", liveMessage.getRoomUID())
+                                .navigation();
+                    }
+                }
+            });
+
+        }
+    }
+}

+ 95 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/message/holder/TUIChatShareMusicMessageHolder.java

@@ -0,0 +1,95 @@
+package com.cooleshow.chatmodule.message.holder;
+
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.common.BaseApplication;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.helper.WebStartHelper;
+import com.cooleshow.chatmodule.R;
+import com.cooleshow.chatmodule.adapter.ItemMarkAdapter;
+import com.cooleshow.chatmodule.message.bean.TUIChatShareLiveMessageBean;
+import com.cooleshow.chatmodule.message.bean.TUIChatShareMusicMessageBean;
+import com.tencent.qcloud.tuikit.timcommon.bean.TUIMessageBean;
+import com.tencent.qcloud.tuikit.timcommon.classicui.widget.message.MessageContentHolder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+/**
+ * Author by pq, Date on 2023/8/9.
+ */
+public class TUIChatShareMusicMessageHolder extends MessageContentHolder {
+    public TUIChatShareMusicMessageHolder(View itemView) {
+        super(itemView);
+    }
+
+    @Override
+    public int getVariableLayout() {
+        return R.layout.rc_chat_share_music;
+    }
+
+    @Override
+    public void layoutVariableViews(TUIMessageBean msg, int position) {
+        if (msg instanceof TUIChatShareMusicMessageBean) {
+            TUIChatShareMusicMessageBean shareMusicMessage = (TUIChatShareMusicMessageBean) msg;
+            TextView tv_name = itemView.findViewById(R.id.tv_name);
+            TextView tv_author_name = itemView.findViewById(R.id.tv_author_name);
+            ImageView im_state = itemView.findViewById(R.id.im_state);
+            ImageView im_header = itemView.findViewById(R.id.im_header);
+            TextView tv_teacher_name = itemView.findViewById(R.id.tv_teacher_name);
+            RecyclerView rv_mark = itemView.findViewById(R.id.rv_mark);
+
+            switch (shareMusicMessage.getChargeType()) {
+                case "FREE":
+                    im_state.setBackgroundResource(R.drawable.icon_score_free);
+                    break;
+                case "VIP":
+                    im_state.setBackgroundResource(R.drawable.icon_score_vip);
+                    break;
+                case "CHARGE":
+                    im_state.setBackgroundResource(R.drawable.icon_score_demand);
+                    break;
+            }
+            tv_name.setText(shareMusicMessage.getSongName());
+            tv_author_name.setText(shareMusicMessage.getSongAuth());
+            GlideUtils.INSTANCE.loadImage(itemView.getContext(), shareMusicMessage.getTeacherAvatar(), im_header, R.drawable.icon_teacher_default_head);
+            tv_teacher_name.setText(shareMusicMessage.getTeacherName());
+            if (!TextUtils.isEmpty(shareMusicMessage.getMusicTagNames())) {
+                rv_mark.setVisibility(View.VISIBLE);
+                List<String> markList = new ArrayList<>();
+                if (shareMusicMessage.getMusicTagNames().contains(",")) {
+                    String[] split = shareMusicMessage.getMusicTagNames().split(",");
+                    for (String s : split) {
+                        markList.add(s);
+                    }
+                } else {
+                    markList.add(shareMusicMessage.getMusicTagNames());
+                }
+                LinearLayoutManager manager = new LinearLayoutManager(itemView.getContext());
+                manager.setOrientation(LinearLayoutManager.HORIZONTAL);
+                rv_mark.setLayoutManager(manager);
+                ItemMarkAdapter itemMarkAdapter = new ItemMarkAdapter(markList);
+                rv_mark.setAdapter(itemMarkAdapter);
+            } else {
+                rv_mark.setVisibility(View.GONE);
+            }
+
+            msgContentFrame.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (shareMusicMessage != null && !TextUtils.isEmpty(shareMusicMessage.getSongId())) {
+                        WebStartHelper.startAccompany(shareMusicMessage.getSongId());
+                    }
+                }
+            });
+        }
+    }
+}

BIN
chatModule/src/main/res/drawable-xhdpi/icon_teacher_default_head.png


BIN
chatModule/src/main/res/drawable-xxhdpi/icon_score_demand.png


BIN
chatModule/src/main/res/drawable-xxhdpi/icon_score_free.png


BIN
chatModule/src/main/res/drawable-xxhdpi/icon_score_vip.png


+ 0 - 0
chatModule/src/main/res/drawable-xxhdpi/icon_teacher_default_head.png


+ 8 - 0
chatModule/src/main/res/drawable/shape_live_msg_tag.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/color_ff4347" />
+    <stroke
+        android:width="1dp"
+        android:color="@color/white" />
+    <corners android:radius="8dp" />
+</shape>

+ 26 - 0
chatModule/src/main/res/layout/layout_mark_item.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content">
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content">
+
+        <TextView
+            android:id="@+id/tv_content"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginRight="6dp"
+            android:background="@drawable/shape_couse_type_text_bg"
+            android:paddingLeft="4dp"
+            android:paddingTop="2dp"
+            android:paddingRight="4dp"
+            android:paddingBottom="2dp"
+            android:text="--"
+            android:textColor="@color/color_ff8c00"
+            android:textSize="@dimen/sp_11" />
+    </RelativeLayout>
+
+
+</RelativeLayout>

+ 118 - 0
chatModule/src/main/res/layout/rc_chat_share_live.xml

@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="14dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginRight="14dp"
+        android:background="@drawable/bg_white_5dp">
+
+        <de.hdodenhof.circleimageview.CircleImageView
+            android:id="@+id/iv_avatar"
+            android:layout_width="42dp"
+            android:layout_height="42dp"
+            android:layout_marginStart="14dp"
+            android:layout_marginTop="11dp"
+            app:civ_border_color="@color/color_ff4347"
+            app:civ_border_width="1dp"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <View
+            android:id="@+id/view_helper"
+            android:layout_width="1px"
+            android:layout_height="1px"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/iv_avatar" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:background="@drawable/shape_live_msg_tag"
+            android:paddingStart="5dp"
+            android:paddingEnd="5dp"
+            android:text="直播中"
+            android:textColor="@color/white"
+            android:textSize="@dimen/sp_11"
+            app:layout_constraintBottom_toBottomOf="@+id/view_helper"
+            app:layout_constraintLeft_toLeftOf="@+id/iv_avatar"
+            app:layout_constraintRight_toRightOf="@+id/iv_avatar"
+            app:layout_constraintTop_toTopOf="@+id/view_helper" />
+
+        <TextView
+            android:id="@+id/tv_title_tip"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="7dp"
+            android:includeFontPadding="false"
+            android:text="「正在直播」"
+            android:textColor="@color/color_999999"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintBottom_toTopOf="@+id/tv_name_tip"
+            app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+            app:layout_constraintTop_toTopOf="@+id/iv_avatar"
+            app:layout_constraintVertical_chainStyle="packed" />
+
+        <TextView
+            android:id="@+id/tv_name_tip"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="3dp"
+            android:layout_marginEnd="14dp"
+            android:ellipsize="end"
+            android:includeFontPadding="false"
+            android:maxLines="1"
+            android:textColor="@color/color_4a4a4a"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+            app:layout_constraintLeft_toLeftOf="@+id/tv_title_tip"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_title_tip"
+            tools:text="李老师在直播间等你哦~" />
+
+
+        <TextView
+            android:id="@+id/tv_content"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="11dp"
+            android:layout_marginEnd="14dp"
+            android:includeFontPadding="false"
+            android:paddingTop="10dp"
+            android:textColor="@color/color_666666"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintLeft_toLeftOf="@+id/iv_avatar"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/iv_avatar"
+            tools:text="李老师带您0基础学习竖笛,通过4节课的学习掌握竖笛演奏方法。" />
+
+        <View
+            android:id="@+id/view_line"
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_marginTop="15dp"
+            android:background="@color/color_f2f2f2"
+            app:layout_constraintTop_toBottomOf="@+id/tv_content" />
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:paddingTop="10dp"
+            android:paddingBottom="10dp"
+            android:text="进入直播间"
+            android:textColor="@color/color_ff4347"
+            android:textSize="@dimen/sp_15"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_line" />
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</FrameLayout>

+ 103 - 0
chatModule/src/main/res/layout/rc_chat_share_music.xml

@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="14dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginRight="14dp"
+        android:background="@drawable/bg_white_10dp">
+
+        <ImageView
+            android:id="@+id/im_music_mark"
+            android:layout_width="@dimen/dp_40"
+            android:layout_height="@dimen/dp_40"
+            android:layout_marginLeft="11dp"
+            android:layout_marginTop="10dp"
+            android:background="@drawable/icon_music_mark"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/tv_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="14dp"
+            android:text="Exodus(出埃及记)"
+            android:textColor="@color/black_333"
+            android:textSize="@dimen/sp_14"
+            android:textStyle="bold"
+            app:layout_constraintLeft_toRightOf="@+id/im_music_mark"
+            app:layout_constraintTop_toTopOf="@+id/im_music_mark" />
+
+        <TextView
+            android:id="@+id/tv_author_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="14dp"
+            android:text="沃伊切赫·基拉尔"
+            app:layout_constraintBottom_toBottomOf="@+id/im_music_mark"
+            app:layout_constraintLeft_toRightOf="@+id/im_music_mark" />
+
+
+        <ImageView
+            android:id="@+id/im_state"
+            android:layout_width="@dimen/dp_55"
+            android:layout_height="@dimen/dp_22"
+            android:layout_marginRight="12dp"
+            android:background="@drawable/icon_score_demand"
+            app:layout_constraintBottom_toBottomOf="@+id/im_music_mark"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/im_music_mark" />
+
+        <View
+            android:id="@+id/view_line"
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginTop="10dp"
+            android:layout_marginRight="9dp"
+            android:background="@color/color_f2f2f2"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/im_music_mark" />
+
+        <de.hdodenhof.circleimageview.CircleImageView
+            android:id="@+id/im_header"
+            android:layout_width="18dp"
+            android:layout_height="18dp"
+            android:layout_marginLeft="14dp"
+            android:layout_marginTop="8dp"
+            android:layout_marginBottom="10dp"
+            android:src="@drawable/icon_teacher_default_head"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintLeft_toLeftOf="@+id/view_line"
+            app:layout_constraintTop_toBottomOf="@+id/view_line"
+            app:layout_goneMarginLeft="20dp" />
+
+        <TextView
+            android:id="@+id/tv_teacher_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="7dp"
+            android:text="宋倩倩"
+            android:textColor="@color/black_333"
+            android:textSize="@dimen/sp_12"
+            app:layout_constraintBottom_toBottomOf="@+id/im_header"
+            app:layout_constraintLeft_toRightOf="@+id/im_header"
+            app:layout_constraintTop_toTopOf="@+id/im_header" />
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_mark"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:visibility="gone"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+            app:layout_constraintLeft_toRightOf="@+id/tv_teacher_name"
+            app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</RelativeLayout>

+ 3 - 0
chatModule/src/main/res/values/strings.xml

@@ -2,4 +2,7 @@
 <resources>
     <string name="group_type_other_str">晋升团</string>
     <string name="group_type_class_str">交付团</string>
+    <string name="live_name_tip">%s在直播间等你哦~</string>
+    <string name="teacher_tag_str">学院</string>
+    <string name="group_admin_str">群主</string>
 </resources>