Browse Source

添加老师端->我收到的评价页面

Pq 3 years ago
parent
commit
748c88ce45

+ 10 - 2
BaseLibrary/src/main/java/com/cooleshow/base/router/RouterPath.kt

@@ -23,14 +23,14 @@ object RouterPath {
         }
     }
 
-    //用户模块
+    //web模块
     class WebCenter {
         companion object {
             const val ACTIVITY_HTML = "/ui/activity/web/HtmlActivity"
         }
     }
 
-    //用户模块
+    //课程模块
     class CourseCenter {
         companion object {
             const val TEACHER_MINE_COURSE = "/teacher/ui/course/MineCourseActivity"
@@ -38,4 +38,12 @@ object RouterPath {
         }
     }
 
+    //评价模块
+    class CommentCenter {
+        companion object {
+            const val TEACHER_RECEIVED_COMMENT = "/teacher/ui/comment/ReceivedCommentActivity"
+        }
+    }
+
+
 }

BIN
BaseLibrary/src/main/res/drawable-xhdpi/icon_search.png


BIN
BaseLibrary/src/main/res/drawable-xxhdpi/icon_search.png


+ 7 - 0
BaseLibrary/src/main/res/drawable/bg_white_18dp.xml

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

+ 5 - 0
BaseLibrary/src/main/res/drawable/shape_1ecdac_18dp.xml

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

+ 1 - 1
BaseLibrary/src/main/res/layout/common_toolbar_layout.xml

@@ -4,7 +4,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/toolbar"
     android:layout_width="match_parent"
-    android:layout_height="73dp"
+    android:layout_height="wrap_content"
     android:background="@color/transparent"
     android:fitsSystemWindows="true"
     android:paddingTop="25dp"

+ 1 - 1
BaseLibrary/src/main/res/layout/common_toolbar_layout_white.xml

@@ -4,7 +4,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/toolbar"
     android:layout_width="match_parent"
-    android:layout_height="73dp"
+    android:layout_height="wrap_content"
     android:background="@color/transparent"
     android:fitsSystemWindows="true"
     android:paddingTop="25dp"

+ 1 - 0
BaseLibrary/src/main/res/values/colors.xml

@@ -53,4 +53,5 @@
     <color name="black_333">#494757</color>
     <color name="color_f85043">#F85043</color>
     <color name="color_f7f8f9">#F7F8F9</color>
+    <color name="color_1ecdac">#1ECDAC</color>
 </resources>

+ 5 - 0
teacher/src/main/AndroidManifest.xml

@@ -38,6 +38,11 @@
             android:name=".ui.course.SparringCourseDetailActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
+        <activity
+            android:name=".ui.comment.ReceivedCommentActivity"
+            android:windowSoftInputMode="adjustPan"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
     </application>
 
 </manifest>

+ 48 - 0
teacher/src/main/java/com/cooleshow/teacher/adapter/ReceivedCommentListAdapter.java

@@ -0,0 +1,48 @@
+package com.cooleshow.teacher.adapter;
+
+import android.widget.ImageView;
+import android.widget.RatingBar;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.module.BaseLoadMoreModule;
+import com.chad.library.adapter.base.module.LoadMoreModule;
+import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.bean.ReceivedCommentListBean;
+
+import androidx.annotation.NonNull;
+
+/**
+ * Author by pq, Date on 2022/5/5.
+ */
+public class ReceivedCommentListAdapter extends BaseQuickAdapter<ReceivedCommentListBean.RowsBean, BaseViewHolder> implements LoadMoreModule {
+
+    public ReceivedCommentListAdapter(int layoutResId) {
+        super(layoutResId);
+    }
+
+    @Override
+    protected void convert(@NonNull BaseViewHolder holder, ReceivedCommentListBean.RowsBean bean) {
+        //头像
+        ImageView iv_avatar = holder.getView(R.id.iv_avatar);
+        GlideUtils.INSTANCE.loadImage(getContext(), bean.avatar, iv_avatar, R.drawable.icon_teacher_default_head);
+        //名称
+        holder.setText(R.id.tv_title, bean.userName);
+        //声部名称
+        holder.setText(R.id.tv_course_name, bean.subjectName);
+        //时间
+        holder.setText(R.id.tv_time, bean.startTime);
+        //评价内容
+        holder.setText(R.id.tv_comment_content, bean.studentReplied);
+        //评分
+        RatingBar ratingBar = holder.getView(R.id.rating_bar_for_student);
+        ratingBar.setRating(bean.score);
+    }
+
+    @NonNull
+    @Override
+    public BaseLoadMoreModule addLoadMoreModule(@NonNull BaseQuickAdapter<?, ?> baseQuickAdapter) {
+        return new BaseLoadMoreModule(baseQuickAdapter);
+    }
+}

+ 10 - 0
teacher/src/main/java/com/cooleshow/teacher/api/APIService.java

@@ -3,6 +3,7 @@ package com.cooleshow.teacher.api;
 import com.cooleshow.base.data.net.BaseResponse;
 import com.cooleshow.teacher.bean.CourseTableDataBean;
 import com.cooleshow.teacher.bean.LiveCourseListBean;
+import com.cooleshow.teacher.bean.ReceivedCommentListBean;
 import com.cooleshow.teacher.bean.SparringCourseCommentBean;
 import com.cooleshow.teacher.bean.SparringCourseHomeworkBean;
 import com.cooleshow.teacher.bean.SparringCourseListBean;
@@ -136,4 +137,13 @@ public interface APIService {
      */
     @GET(TEACHER_GROUP + "teacher/queryUserInfo")
     Observable<BaseResponse<TeacherUserInfo>> getTeacherUserInfo();
+
+    /**
+     * 查询我收到的评价
+     *
+     * @param
+     * @return
+     */
+    @POST(TEACHER_GROUP + "courseReplied/myReplied")
+    Observable<BaseResponse<ReceivedCommentListBean>> getReceivedComment(@Body RequestBody body);
 }

+ 101 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/ReceivedCommentListBean.java

@@ -0,0 +1,101 @@
+package com.cooleshow.teacher.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Author by pq, Date on 2022/5/5.
+ */
+public class ReceivedCommentListBean {
+
+    /**
+     * footer : [{"avatar":"","classDate":"","courseGroupId":0,"courseId":0,"endTime":"","realName":"","score":"","startTime":"","studentReplied":"","subjectId":0,"subjectName":"","userId":0,"userName":""}]
+     * limit : 0
+     * nextPage : 0
+     * offset : 0
+     * pageNo : 0
+     * prePage : 0
+     * rows : [{"avatar":"","classDate":"","courseGroupId":0,"courseId":0,"endTime":"","realName":"","score":"","startTime":"","studentReplied":"","subjectId":0,"subjectName":"","userId":0,"userName":""}]
+     * statInfo : {}
+     * total : 0
+     * totalPage : 0
+     */
+
+    public int limit;
+    public int nextPage;
+    public int offset;
+    public int pageNo;
+    public int prePage;
+    public StatInfoBean statInfo;
+    public int total;
+    public int totalPage;
+    public ArrayList<FooterBean> footer;
+    public ArrayList<RowsBean> rows;
+
+    public static class StatInfoBean {
+    }
+
+    public static class FooterBean {
+        /**
+         * avatar :
+         * classDate :
+         * courseGroupId : 0
+         * courseId : 0
+         * endTime :
+         * realName :
+         * score :
+         * startTime :
+         * studentReplied :
+         * subjectId : 0
+         * subjectName :
+         * userId : 0
+         * userName :
+         */
+
+        public String avatar;
+        public String classDate;
+        public int courseGroupId;
+        public int courseId;
+        public String endTime;
+        public String realName;
+        public String score;
+        public String startTime;
+        public String studentReplied;
+        public int subjectId;
+        public String subjectName;
+        public int userId;
+        public String userName;
+    }
+
+    public static class RowsBean {
+        /**
+         * avatar :
+         * classDate :
+         * courseGroupId : 0
+         * courseId : 0
+         * endTime :
+         * realName :
+         * score :
+         * startTime :
+         * studentReplied :
+         * subjectId : 0
+         * subjectName :
+         * userId : 0
+         * userName :
+         */
+
+        public String avatar;
+        public String classDate;
+        public int courseGroupId;
+        public int courseId;
+        public String endTime;
+        public String realName;
+        public int score;
+        public String startTime;
+        public String studentReplied;
+        public int subjectId;
+        public String subjectName;
+        public int userId;
+        public String userName;
+    }
+}

+ 19 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/ReceivedCommentContract.java

@@ -0,0 +1,19 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.teacher.bean.ReceivedCommentListBean;
+
+/**
+ * Author by pq, Date on 2022/5/5.
+ */
+public interface ReceivedCommentContract {
+    interface ReceivedCommentView extends BaseView {
+        void queryCommentSuccess(int page,ReceivedCommentListBean commentListBean);
+
+        void queryCommentError(int page);
+    }
+
+    interface Presenter {
+        void queryReceivedComment(boolean isShowLoading, String month, String studentName, int page);
+    }
+}

+ 55 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/comment/ReceivedCommentPresenter.java

@@ -0,0 +1,55 @@
+package com.cooleshow.teacher.presenter.comment;
+
+import android.text.TextUtils;
+
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.bean.LiveCourseListBean;
+import com.cooleshow.teacher.bean.ReceivedCommentListBean;
+import com.cooleshow.teacher.contract.ReceivedCommentContract;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * Author by pq, Date on 2022/5/5.
+ */
+public class ReceivedCommentPresenter extends BasePresenter<ReceivedCommentContract.ReceivedCommentView> implements ReceivedCommentContract.Presenter {
+
+    @Override
+    public void queryReceivedComment(boolean isShowLoading, String month, String studentName, int page) {
+        if (isShowLoading && getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.putOpt("classDate", month);
+//            jsonObject.putOpt("classMonth", month);
+            jsonObject.putOpt("page", page);
+            if (!TextUtils.isEmpty(studentName)) {
+                jsonObject.putOpt("studentName", studentName);
+            }
+            jsonObject.putOpt("rows", 10);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(APIService.class).getReceivedComment(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<ReceivedCommentListBean>(getView()) {
+            @Override
+            protected void onSuccess(ReceivedCommentListBean data) {
+                if (getView() != null) {
+                    getView().queryCommentSuccess(page, data);
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (getView() != null) {
+                    getView().queryCommentError(page);
+                }
+            }
+        });
+    }
+}

+ 254 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/comment/ReceivedCommentActivity.java

@@ -0,0 +1,254 @@
+package com.cooleshow.teacher.ui.comment;
+
+import android.os.Bundle;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.view.View;
+import android.widget.TextView;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.bigkoo.pickerview.builder.TimePickerBuilder;
+import com.bigkoo.pickerview.listener.CustomListener;
+import com.bigkoo.pickerview.view.TimePickerView;
+import com.chad.library.adapter.base.listener.OnLoadMoreListener;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.TimeUtils;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.base.widgets.DefaultTextWatcher;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.adapter.ReceivedCommentListAdapter;
+import com.cooleshow.teacher.bean.ReceivedCommentListBean;
+import com.cooleshow.teacher.constants.CourseConstants;
+import com.cooleshow.teacher.contract.ReceivedCommentContract;
+import com.cooleshow.teacher.databinding.ActivityReceivedCommentLayoutBinding;
+import com.cooleshow.teacher.presenter.comment.ReceivedCommentPresenter;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+
+import java.util.Calendar;
+import java.util.Date;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+/**
+ * Author by pq, Date on 2022/5/5.
+ */
+@Route(path = RouterPath.CommentCenter.TEACHER_RECEIVED_COMMENT)
+public class ReceivedCommentActivity extends BaseMVPActivity<ActivityReceivedCommentLayoutBinding, ReceivedCommentPresenter> implements ReceivedCommentContract.ReceivedCommentView, View.OnClickListener {
+    private TimePickerView pvTime;
+    private Date currentSelectDate;
+    private String currentFilterDate;
+    private String currentStudentName;
+    private int currentPage = 1;
+    private ReceivedCommentListAdapter mListAdapter;
+    private View mEmptyView;
+    private TextView mTvEmptyTip;
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
+    }
+
+    @Override
+    protected void initView() {
+        viewBinding.tvDate.setOnClickListener(this);
+    }
+
+    @Override
+    public void initData() {
+        super.initData();
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "我收到的评价");
+        currentSelectDate = TimeUtils.getNowDate();
+        mListAdapter = new ReceivedCommentListAdapter(R.layout.item_received_comment_layout);
+        viewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
+        viewBinding.recyclerView.setAdapter(mListAdapter);
+        initListener();
+        reBuildFilter(currentSelectDate, currentStudentName);
+    }
+
+    private void initListener() {
+        viewBinding.tvSearch.setOnClickListener(this);
+        viewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                currentPage = 1;
+                queryComment(true);
+            }
+        });
+
+        mListAdapter.getLoadMoreModule().setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore() {
+                //上拉加载
+                currentPage++;
+                queryComment(false);
+            }
+        });
+        TextWatcher textWatcher = new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+            }
+
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
+
+            }
+
+            @Override
+            public void afterTextChanged(Editable s) {
+
+            }
+        };
+        viewBinding.etTargetName.addTextChangedListener(textWatcher);
+    }
+
+    private void reBuildFilter(Date date, String targetName) {
+        currentSelectDate = date != null ? date : TimeUtils.getNowDate();
+        String targetDateTimeStr = TimeUtils.date2String(currentSelectDate, TimeUtils.getSafeDateFormat("yyyy-MM"));
+        if (TextUtils.equals(targetDateTimeStr, currentFilterDate) && TextUtils.equals(targetName, currentStudentName)) {
+            //防止重复条件触发
+            return;
+        }
+        currentStudentName = targetName;
+        currentFilterDate = targetDateTimeStr;
+        currentPage = 1;
+        viewBinding.tvDate.setText(currentFilterDate);
+        queryComment(true);
+    }
+
+    private void queryComment(boolean isShowLoading) {
+        presenter.queryReceivedComment(isShowLoading, currentFilterDate, currentStudentName, currentPage);
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (v.getId() == R.id.tv_date) {
+            //显示时间选择器
+            showTimeSelectPicker();
+            return;
+        }
+
+        if (v.getId() == R.id.tv_search) {
+            //搜索
+            String targetName = viewBinding.etTargetName.getText().toString();
+//            if (TextUtils.isEmpty(targetName)) {
+//                return;
+//            }
+            reBuildFilter(currentSelectDate, targetName);
+        }
+    }
+
+    @Override
+    protected ActivityReceivedCommentLayoutBinding getLayoutView() {
+        return ActivityReceivedCommentLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected ReceivedCommentPresenter createPresenter() {
+        return new ReceivedCommentPresenter();
+    }
+
+
+    private void showTimeSelectPicker() {
+        if (pvTime == null) {
+            pvTime = new TimePickerBuilder(this, (date, v) -> {//选中事件回调
+                reBuildFilter(date, currentStudentName);
+            }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_default_layout, new CustomListener() {
+                @Override
+                public void customLayout(View v) {
+                    //自定义布局中的控件初始化及事件处理
+                    final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
+                    TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
+                    tvSubmit.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View v) {
+                            pvTime.returnData();
+                            pvTime.dismiss();
+                        }
+                    });
+                    ivCancel.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View v) {
+                            pvTime.dismiss();
+                        }
+                    });
+
+                }
+            })
+                    .setLineSpacingMultiplier(2.5f)
+                    .setType(new boolean[]{true, true, false, false, false, false})// 默认全部显示
+                    .setTextColorCenter(getResources().getColor(com.cooleshow.base.R.color.color_1a1a1a))//设置选中项的颜色
+                    .isDialog(false)//是否显示为对话框样式
+                    .setLabel("年", "月", "", "", "", "")
+                    .build();
+        }
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(currentSelectDate);
+        pvTime.setDate(calendar);
+        if (!pvTime.isShowing()) {
+            pvTime.show();
+        }
+    }
+
+    @Override
+    public void queryCommentSuccess(int page, ReceivedCommentListBean commentListBean) {
+        if (isDestroyed() || isFinishing()) {
+            return;
+        }
+        if (commentListBean != null) {
+            if (page == 1) {
+                //第一页
+                viewBinding.refreshLayout.finishRefresh();
+                if (mListAdapter != null) {
+                    mListAdapter.getData().clear();
+                    mListAdapter.notifyDataSetChanged();
+                    if (commentListBean.rows != null && commentListBean.rows.size() > 0) {
+                        mListAdapter.setNewInstance(commentListBean.rows);
+                    } else {
+                        showEmptyView();
+                    }
+                }
+            } else {
+                //加载更多
+                if (mListAdapter != null) {
+                    if (commentListBean.rows != null && commentListBean.rows.size() > 0) {
+                        mListAdapter.getLoadMoreModule().loadMoreComplete();
+                        mListAdapter.addData(commentListBean.rows);
+                    } else {
+                        mListAdapter.getLoadMoreModule().loadMoreEnd();
+                    }
+                }
+            }
+        }
+    }
+
+    private void showEmptyView() {
+        if (mEmptyView == null) {
+            mEmptyView = getLayoutInflater().inflate(com.cooleshow.base.R.layout.empty_layout, mListAdapter.getEmptyLayout(), false);
+            mTvEmptyTip = mEmptyView.findViewById(com.cooleshow.base.R.id.tv_empty_tip);
+        }
+        mTvEmptyTip.setText("暂无数据");
+        mListAdapter.setEmptyView(mEmptyView);
+    }
+
+    @Override
+    public void queryCommentError(int page) {
+        if (isFinishing() || isDestroyed()) {
+            return;
+        }
+        if (page == 1) {
+            viewBinding.refreshLayout.finishRefresh();
+        } else {
+            if (mListAdapter != null) {
+                currentPage--;
+                mListAdapter.getLoadMoreModule().loadMoreFail();
+            }
+        }
+    }
+}

+ 5 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeFragment.kt

@@ -35,6 +35,7 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
         mViewBinding.cardMineCourse.setOnClickListener(this)
         mViewBinding.ivUnCertificationTip.setOnClickListener(this)
         mViewBinding.cardMineIncome.setOnClickListener(this)
+        mViewBinding.cardMineAssess.setOnClickListener(this)
     }
 
     override fun createPresenter(): HomePresenter {
@@ -131,6 +132,10 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
                 ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
                     .navigation()
             }
+            R.id.card_mine_assess -> {
+                ARouter.getInstance().build(RouterPath.CommentCenter.TEACHER_RECEIVED_COMMENT)
+                    .navigation()
+            }
         }
     }
 

+ 102 - 0
teacher/src/main/res/layout/activity_received_comment_layout.xml

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+    <TextView
+        android:drawablePadding="3dp"
+        android:id="@+id/tv_date"
+        android:layout_width="wrap_content"
+        android:layout_height="36dp"
+        android:drawableRight="@drawable/icon_arrow_down"
+        android:gravity="center"
+        android:paddingStart="14dp"
+        android:paddingEnd="14dp"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg"
+        tools:text="2021年9月" />
+
+    <View
+        android:id="@+id/view_search_bg"
+        android:layout_width="0dp"
+        android:layout_height="36dp"
+        android:layout_marginTop="14dp"
+        android:layout_marginEnd="14dp"
+        android:background="@drawable/bg_white_18dp"
+        app:layout_constraintLeft_toRightOf="@+id/tv_date"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/toolbar_include" />
+
+    <ImageView
+        android:id="@+id/iv_search_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="11dp"
+        android:src="@drawable/icon_search"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <EditText
+        android:id="@+id/et_target_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="5dp"
+        android:background="@null"
+        android:ellipsize="end"
+        android:hint="请输入学员姓名"
+        android:maxLines="1"
+        android:paddingStart="8dp"
+        android:textColor="@color/color_333333"
+        android:textColorHint="@color/color_999999"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toRightOf="@+id/iv_search_icon"
+        app:layout_constraintRight_toLeftOf="@+id/tv_search"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+
+    <TextView
+        android:id="@+id/tv_search"
+        android:layout_width="56dp"
+        android:layout_height="28dp"
+        android:layout_marginEnd="4dp"
+        android:background="@drawable/shape_1ecdac_18dp"
+        android:gravity="center"
+        android:text="搜索"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintRight_toRightOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_search_bg">
+
+        <com.scwang.smart.refresh.header.ClassicsHeader
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/recyclerView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:scrollbars="none" />
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 106 - 0
teacher/src/main/res/layout/item_received_comment_layout.xml

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout 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"
+    android:layout_marginStart="14dp"
+    android:layout_marginTop="12dp"
+    android:layout_marginEnd="14dp"
+    android:background="@drawable/bg_white_10dp"
+    android:paddingStart="11dp"
+    android:paddingEnd="11dp"
+    android:paddingBottom="16dp">
+
+    <com.cooleshow.base.widgets.QMUIRadiusImageView
+        android:id="@+id/iv_avatar"
+        android:layout_width="47dp"
+        android:layout_height="51dp"
+        android:layout_marginTop="19dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:qmui_corner_radius="5dp" />
+
+
+    <TextView
+        android:id="@+id/tv_title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="10dp"
+        android:layout_marginTop="5dp"
+        android:includeFontPadding="false"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_16"
+        android:textStyle="bold"
+        app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+        app:layout_constraintTop_toTopOf="@+id/iv_avatar"
+        tools:text="张豆豆" />
+
+    <TextView
+        android:id="@+id/tv_course_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:background="@drawable/shape_couse_type_text_bg"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:paddingStart="4dp"
+        android:paddingTop="2dp"
+        android:paddingEnd="4dp"
+        android:paddingBottom="2dp"
+        android:textColor="@color/color_ff8c00"
+        android:textSize="@dimen/sp_11"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_title"
+        app:layout_constraintTop_toTopOf="@+id/tv_title"
+        tools:text="单簧管" />
+
+    <RatingBar
+        android:id="@+id/rating_bar_for_student"
+        style="@style/HomeRatingBar"
+        android:layout_width="wrap_content"
+        android:layout_height="19dp"
+        android:numStars="5"
+        android:rating="3"
+        android:stepSize="1"
+        android:visibility="visible"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_title" />
+
+
+    <ImageView
+        android:id="@+id/iv_clock_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="11dp"
+        android:src="@drawable/icon_clock"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_title" />
+
+    <TextView
+        android:id="@+id/tv_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="6dp"
+        android:includeFontPadding="false"
+        android:textColor="@color/color_666666"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_clock_icon"
+        app:layout_constraintLeft_toRightOf="@+id/iv_clock_icon"
+        app:layout_constraintTop_toTopOf="@+id/iv_clock_icon"
+        tools:text="2021/09/17 14:00~14:25" />
+
+    <TextView
+        android:id="@+id/tv_comment_content"
+        android:layout_marginTop="14dp"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/iv_avatar"
+        tools:text="老师非常有耐心,一个小节一个小节的帮助我抠细节,之前我觉得这首曲子我已经练得不错了,但是经过老师的指点后发现自己还有很多不足之处,现在再吹这首曲子明显更有表现力了!" />
+</androidx.constraintlayout.widget.ConstraintLayout>