Prechádzať zdrojové kódy

优化老师端布置作业和琴房课课程详情样式

Pq 8 mesiacov pred
rodič
commit
9916682513

+ 5 - 2
teacher/src/main/java/com/cooleshow/teacher/adapter/PianoRoomCourseStudentListAdapter.java

@@ -50,14 +50,17 @@ public class PianoRoomCourseStudentListAdapter extends BaseQuickAdapter<PianoRoo
         if (data.submitHomework == HOMEWORK_STATUS_IS_OK) {
             if (TextUtils.equals(data.homeworkStatus, HomeWorkConstants.COURSE_HOMEWORK_NOTREVIEW)) {
                 tv_submit_tip.setText("未点评");
+                tv_submit_tip.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
             } else {
                 tv_submit_tip.setText("已点评");
+                tv_submit_tip.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
             }
-            tv_submit_tip.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_666666));
         } else {
             tv_submit_tip.setText("未提交");
-            tv_submit_tip.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
+            tv_submit_tip.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
         }
+        View view_line = holder.getView(R.id.view_line);
+        view_line.setVisibility(holder.getLayoutPosition() == getData().size() - 1 ? View.GONE : View.VISIBLE);
     }
 
     public void setHomeWordStatus(int decorateHomework) {

+ 56 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/PianoRoomCourseInfoBean.java

@@ -83,6 +83,62 @@ public class PianoRoomCourseInfoBean {
             public String subjectName;
             public int submitHomework;
             public boolean delFlag;
+
+            public String getHomeworkStatus() {
+                return homeworkStatus;
+            }
+
+            public void setHomeworkStatus(String homeworkStatus) {
+                this.homeworkStatus = homeworkStatus;
+            }
+
+            public String getStudentAvatar() {
+                return studentAvatar;
+            }
+
+            public void setStudentAvatar(String studentAvatar) {
+                this.studentAvatar = studentAvatar;
+            }
+
+            public String getStudentId() {
+                return studentId;
+            }
+
+            public void setStudentId(String studentId) {
+                this.studentId = studentId;
+            }
+
+            public String getStudentName() {
+                return studentName;
+            }
+
+            public void setStudentName(String studentName) {
+                this.studentName = studentName;
+            }
+
+            public String getSubjectName() {
+                return subjectName;
+            }
+
+            public void setSubjectName(String subjectName) {
+                this.subjectName = subjectName;
+            }
+
+            public int getSubmitHomework() {
+                return submitHomework;
+            }
+
+            public void setSubmitHomework(int submitHomework) {
+                this.submitHomework = submitHomework;
+            }
+
+            public boolean isDelFlag() {
+                return delFlag;
+            }
+
+            public void setDelFlag(boolean delFlag) {
+                this.delFlag = delFlag;
+            }
         }
     }
 }

+ 4 - 2
teacher/src/main/java/com/cooleshow/teacher/constants/CourseConstants.java

@@ -3,6 +3,8 @@ package com.cooleshow.teacher.constants;
 import android.text.TextUtils;
 
 import com.cooleshow.base.constanst.CourseStatusType;
+import com.cooleshow.base.utils.Utils;
+import com.cooleshow.teacher.R;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -89,7 +91,7 @@ public class CourseConstants {
      */
     public static String getTeacherHomeworkDefaultTip(String courseStatus) {
         if (TextUtils.equals(courseStatus, CourseStatusType.COMPLETE.getId())) {
-            return "课程已结束,请布置作业";
+            return Utils.getApp().getString(R.string.please_set_homework_tip);
         }
         return "课程结束之后才能布置作业哦";
     }
@@ -102,7 +104,7 @@ public class CourseConstants {
      */
     public static String getHomeworkVideoDefaultTip(String courseStatus) {
         if (TextUtils.equals(courseStatus, CourseStatusType.COMPLETE.getId())) {
-            return "学员尚未上传作业视频";
+            return Utils.getApp().getString(R.string.student_not_upload_homework_tip);
         }
         return "课程结束之后学员可上传作业视频";
     }

+ 24 - 3
teacher/src/main/java/com/cooleshow/teacher/ui/course/PianoRoomCourseDetailActivity.java

@@ -22,6 +22,7 @@ import com.cooleshow.teacher.CourseHelper;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.PianoRoomCourseStudentListAdapter;
 import com.cooleshow.teacher.bean.PianoRoomCourseInfoBean;
+import com.cooleshow.teacher.bean.VIPCourseGroupDetailListBean;
 import com.cooleshow.teacher.constants.CourseConstants;
 import com.cooleshow.teacher.constants.TeacherConfig;
 import com.cooleshow.teacher.contract.PianoRoomCourseDetailContract;
@@ -30,6 +31,7 @@ import com.cooleshow.teacher.presenter.course.PianoRoomDetailPresenter;
 import com.cooleshow.teacher.widgets.CourseSetCommentDialog;
 import com.dayayuemeng.classroom.helper.OpenClassRoomHelper;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import androidx.annotation.NonNull;
@@ -66,7 +68,6 @@ public class PianoRoomCourseDetailActivity extends BaseMVPActivity<ActivityPiano
         }
 
         viewBinding.tvSetHomework.setOnClickListener(this);
-        viewBinding.ivGoChat.setOnClickListener(this);
         viewBinding.tvEnterRoom.setOnClickListener(this);
     }
 
@@ -141,13 +142,15 @@ public class PianoRoomCourseDetailActivity extends BaseMVPActivity<ActivityPiano
         }
         mInfoBean = infoBean;
         //时间
-        viewBinding.tvCourseTime.setText(UiUtils.getCourseTimeString(infoBean.startTime, infoBean.endTime));
+        viewBinding.tvTime.setText(UiUtils.getCourseTimeString(infoBean.startTime, infoBean.endTime));
         //title
         viewBinding.tvTitle.setText(infoBean.courseGroupName);
         //subjectName
         viewBinding.tvCourseName.setText(infoBean.subjectName);
         //学生人数
-        viewBinding.tvCoursePeopleNum.setText(String.format("%s人", infoBean.studentNum));
+        List<PianoRoomCourseInfoBean.StudentHomeworkListBean.RecordsBean> records = infoBean.studentHomeworkList.records;
+        viewBinding.tvName.setText(getStudentNames(records));
+//        viewBinding.tvCoursePeopleNum.setText(String.format("%s人", infoBean.studentNum));
         String status = infoBean.courseStatus;
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_NOT_START, status)) {
             //课程未开始
@@ -176,6 +179,24 @@ public class PianoRoomCourseDetailActivity extends BaseMVPActivity<ActivityPiano
         handleStudentList(infoBean);
     }
 
+    private String getStudentNames(List<PianoRoomCourseInfoBean.StudentHomeworkListBean.RecordsBean> list) {
+        if (list == null || list.size() == 0) {
+            return "";
+        }
+        StringBuilder stringBuilder = new StringBuilder();
+        if (list.size() > 1) {
+            stringBuilder.append(list.get(0).getStudentName())
+                    .append("、")
+                    .append(list.get(1).getStudentName())
+                    .append("等")
+                    .append(list.size())
+                    .append("人");
+        } else {
+            stringBuilder.append(list.get(0).getStudentName());
+        }
+        return stringBuilder.toString();
+    }
+
     /**
      * 提交布置作业成功
      */

+ 14 - 11
teacher/src/main/java/com/cooleshow/teacher/ui/work/AssignHomeworkActivity.java

@@ -101,35 +101,35 @@ public class AssignHomeworkActivity extends BaseMVPActivity<ActivityAssignHomewo
         if (bean == null) {
             return;
         }
+        viewBinding.tvTitle.setText(bean.courseGroupName);
+        viewBinding.tvName.setText(bean.studentName);
         //subjectName
         if (TextUtils.equals(bean.courseType, CourseConstants.PIANO_ROOM_COURSE)) {
             //琴房课
-            viewBinding.imHeader.setImageResource(R.drawable.icon_piano_room_course);
-            viewBinding.tvName.setText(bean.courseGroupName);
+            viewBinding.ivAvatar.setImageResource(R.drawable.icon_piano_room_course);
         } else {
             //陪练课
-            GlideUtils.INSTANCE.loadImage(this, bean.studentAvatar, viewBinding.imHeader, R.drawable.icon_teacher_default_head);
-            viewBinding.tvName.setText(bean.studentName);
+            GlideUtils.INSTANCE.loadImage(this, bean.studentAvatar, viewBinding.ivAvatar, R.drawable.icon_teacher_default_head);
         }
         viewBinding.tvCourseName.setText(bean.subjectName);
 
-        viewBinding.tvDate.setText(UiUtils.getCourseTimeString(bean.startTime, bean.endTime));
+        viewBinding.tvTime.setText(UiUtils.getCourseTimeString(bean.startTime, bean.endTime));
 
         String status = bean.courseStatus;
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_NOT_START, status)) {
             //课程未开始
-            viewBinding.tvState.setText(getString(R.string.course_not_start_str));
-            viewBinding.tvState.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
+            viewBinding.tvCourseStatus.setText(getString(R.string.course_not_start_str));
+            viewBinding.tvCourseStatus.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
         }
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_ING, status)) {
             //课程进行中
-            viewBinding.tvState.setText(R.string.course_ing_str);
-            viewBinding.tvState.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
+            viewBinding.tvCourseStatus.setText(R.string.course_ing_str);
+            viewBinding.tvCourseStatus.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
         }
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_COMPLETE, status)) {
             //课程已结束
-            viewBinding.tvState.setText(R.string.course_is_completed);
-            viewBinding.tvState.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_999999));
+            viewBinding.tvCourseStatus.setText(R.string.course_is_completed);
+            viewBinding.tvCourseStatus.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_999999));
         }
 
         if (bean.decorateHomework == CourseConstants.COURSE_HOMEWORK_SET) {
@@ -165,6 +165,8 @@ public class AssignHomeworkActivity extends BaseMVPActivity<ActivityAssignHomewo
                 viewBinding.tvHomeworkVideoEmptyText.setText("学员尚未上传作业视频");
             }
         }
+
+        boolean isSubmit = bean.submitHomework == CourseConstants.COURSE_HOMEWORK_STU_SUBMIT;
         //作业点评
         if (!TextUtils.isEmpty(bean.teacherReplied)) {
             //老师已点评作业
@@ -180,6 +182,7 @@ public class AssignHomeworkActivity extends BaseMVPActivity<ActivityAssignHomewo
                 viewBinding.commentView.setVisibility(View.GONE);
             }
             viewBinding.tvHomeworkCommentEmptyText.setVisibility(View.VISIBLE);
+            viewBinding.tvHomeworkCommentEmptyText.setText(CourseConstants.getHomeworkCommentDefaultTip(isSubmit));
             viewBinding.tvHomeworkSetComment.setVisibility(View.VISIBLE);
             viewBinding.tvHomeworkCommentContent.setVisibility(View.GONE);
         }

+ 414 - 327
teacher/src/main/res/layout/activity_assign_homework.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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"
@@ -8,344 +8,431 @@
     android:orientation="vertical"
     tools:ignore="MissingDefaultResource">
 
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:src="@drawable/bg_appointment_top"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
     <com.cooleshow.base.widgets.ComTitleBar
         android:id="@+id/title_view"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
         app:title_text="布置作业" />
 
-    <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_clock"
-            android:layout_width="@dimen/dp_16"
-            android:layout_height="@dimen/dp_16"
-            android:layout_marginLeft="11dp"
-            android:layout_marginTop="@dimen/dp_12"
-            android:background="@drawable/icon_clock"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <TextView
-            android:id="@+id/tv_date"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="7dp"
-            android:textColor="@color/color_666666"
-            android:textSize="@dimen/sp_13"
-            app:layout_constraintBottom_toBottomOf="@+id/im_clock"
-            app:layout_constraintLeft_toRightOf="@+id/im_clock"
-            app:layout_constraintTop_toTopOf="@+id/im_clock" />
-
-        <TextView
-            android:id="@+id/tv_state"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginRight="11dp"
-            android:text="已结束"
-            android:textColor="@color/color_999999"
-            android:textSize="@dimen/sp_14"
-            app:layout_constraintBottom_toBottomOf="@+id/im_clock"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/im_clock" />
-
-        <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_constraintTop_toBottomOf="@+id/im_clock" />
-
-        <com.cooleshow.base.widgets.QMUIRadiusImageView
-            android:id="@+id/im_header"
-            android:layout_width="@dimen/dp_47"
-            android:layout_height="@dimen/dp_51"
-            android:layout_marginLeft="11dp"
-            android:layout_marginTop="17dp"
-            android:layout_marginBottom="20dp"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/view_line"
-            app:qmui_corner_radius="5dp" />
-
-        <TextView
-            android:id="@+id/tv_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="10dp"
-            android:textColor="@color/color_1a1a1a"
-            android:textSize="@dimen/sp_16"
-            app:layout_constraintLeft_toRightOf="@+id/im_header"
-            app:layout_constraintTop_toTopOf="@+id/im_header" />
-
-        <TextView
-            android:id="@+id/tv_course_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/dp_11"
-            android:background="@drawable/shape_couse_type_text_bg"
-            android:gravity="center"
-            android:includeFontPadding="false"
-            android:paddingStart="4dp"
-            android:paddingTop="1.5dp"
-            android:paddingEnd="4dp"
-            android:paddingBottom="1.5dp"
-            android:textColor="@color/color_ff8c00"
-            android:textSize="@dimen/sp_10"
-            app:layout_constraintLeft_toLeftOf="@+id/tv_name"
-            app:layout_constraintTop_toBottomOf="@+id/tv_name"
-            tools:text="单簧管" />
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-    <androidx.constraintlayout.widget.ConstraintLayout
+    <androidx.core.widget.NestedScrollView
         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"
-        android:paddingBottom="10dp">
-
-        <View
-            android:id="@+id/view_title_line_homework"
-            android:layout_width="4dp"
-            android:layout_height="14dp"
-            android:layout_marginStart="12dp"
-            android:layout_marginTop="13dp"
-            android:background="@drawable/shape_course_title_tag_bg"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <TextView
-            android:id="@+id/tv_homework_title"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:includeFontPadding="false"
-            android:paddingStart="5dp"
-            android:text="课后作业"
-            android:textColor="@color/color_1a1a1a"
-            android:textSize="@dimen/sp_13"
-            app:layout_constraintBottom_toBottomOf="@+id/view_title_line_homework"
-            app:layout_constraintLeft_toRightOf="@+id/view_title_line_homework"
-            app:layout_constraintTop_toTopOf="@+id/view_title_line_homework" />
-
-        <TextView
-            android:id="@+id/tv_set_homework"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:drawableLeft="@drawable/icon_set_homework"
-            android:drawablePadding="3dp"
-            android:includeFontPadding="false"
-            android:paddingEnd="11dp"
-            android:text="@string/set_homework_str"
-            android:textColor="@color/color_2dc7aa"
-            android:textSize="@dimen/sp_14"
-            android:visibility="visible"
-            app:layout_constraintBottom_toBottomOf="@+id/view_title_line_homework"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/view_title_line_homework" />
-
-        <FrameLayout
-            android:id="@+id/view_homework_content_bg"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="11dp"
-            android:layout_marginTop="11dp"
-            android:layout_marginEnd="11dp"
-            android:background="@drawable/shape_bg_f7f8f9_4dp"
-            android:minHeight="88dp"
-            android:padding="11dp"
-            app:layout_constraintTop_toBottomOf="@+id/view_title_line_homework">
-
-            <TextView
-                android:id="@+id/tv_homework_empty_text"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:drawableLeft="@drawable/icon_homework_empty"
-                android:drawablePadding="8dp"
-                android:gravity="center_vertical"
-                android:text="课程结束之后记得布置作业哦!"
-                android:textColor="@color/color_999999"
-                android:textSize="@dimen/sp_13" />
-
-            <TextView
-                android:id="@+id/tv_homework_content"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:includeFontPadding="false"
-                android:textColor="@color/color_333333"
-                android:textSize="@dimen/sp_13"
-                android:visibility="gone"
-                tools:text="每个音的指法比较熟练,但是遇到指法变换比较频繁的小节熟练度不足,建议平时可以选择指法变换较大的曲目多加练习!" />
-        </FrameLayout>
-    </androidx.constraintlayout.widget.ConstraintLayout>
+        android:layout_height="0dp"
+        android:overScrollMode="never"
+        android:scrollbars="none"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/title_view">
 
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/home_word_video_view"
-        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"
-        android:paddingBottom="10dp"
-        android:visibility="gone">
-
-        <View
-            android:id="@+id/view_video_work_line"
-            android:layout_width="4dp"
-            android:layout_height="14dp"
-            android:layout_marginStart="12dp"
-            android:layout_marginTop="13dp"
-            android:background="@drawable/shape_course_title_tag_bg"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <TextView
-            android:id="@+id/tv_video_work_title"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:includeFontPadding="false"
-            android:paddingStart="5dp"
-            android:text="视频作业"
-            android:textColor="@color/color_1a1a1a"
-            android:textSize="@dimen/sp_13"
-            android:textStyle="bold"
-            app:layout_constraintBottom_toBottomOf="@+id/view_video_work_line"
-            app:layout_constraintLeft_toRightOf="@+id/view_video_work_line"
-            app:layout_constraintTop_toTopOf="@+id/view_video_work_line" />
-
-        <FrameLayout
-            android:id="@+id/view_homework_video_content_bg"
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginStart="11dp"
-            android:layout_marginTop="11dp"
-            android:layout_marginEnd="11dp"
-            android:background="@drawable/shape_bg_f7f8f9_4dp"
-            android:minHeight="88dp"
-            android:padding="11dp"
-            app:layout_constraintTop_toBottomOf="@+id/view_video_work_line">
-
-            <TextView
-                android:id="@+id/tv_homework_video_empty_text"
-                android:layout_width="wrap_content"
+            android:orientation="vertical"
+            android:paddingStart="14dp"
+            android:paddingTop="12dp"
+            android:paddingEnd="14dp"
+            android:paddingBottom="12dp">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/cs_top_info"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:drawableLeft="@drawable/icon_homework_video_empty"
-                android:drawablePadding="8dp"
-                android:gravity="center_vertical"
-                android:text="学员尚未上传作业视频"
-                android:textColor="@color/color_999999"
-                android:textSize="@dimen/sp_13" />
-
-            <LinearLayout
-                android:id="@+id/ll_homework_video_content"
-                android:layout_width="wrap_content"
+                android:background="@drawable/bg_white_10dp"
+                android:paddingStart="12dp"
+                android:paddingEnd="12dp"
+                android:paddingBottom="12dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/title_view">
+
+                <ImageView
+                    android:id="@+id/iv_clock_icon"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="15dp"
+                    android:src="@drawable/icon_clock"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <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" />
+
+                <View
+                    android:id="@+id/view_line"
+                    android:layout_width="0dp"
+                    android:layout_height="1dp"
+                    android:layout_marginTop="15dp"
+                    android:background="@color/color_f2f2f2"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/iv_clock_icon" />
+
+                <de.hdodenhof.circleimageview.CircleImageView
+                    android:id="@+id/iv_avatar"
+                    android:layout_width="40dp"
+                    android:layout_height="40dp"
+                    android:layout_marginTop="12dp"
+                    android:src="@drawable/icon_default_head"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/view_line"
+                    app:qmui_corner_radius="5dp" />
+
+                <TextView
+                    android:id="@+id/tv_title"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="10dp"
+                    android:ellipsize="end"
+                    android:includeFontPadding="false"
+                    android:maxLines="1"
+                    android:textColor="@color/color_1a1a1a"
+                    android:textSize="@dimen/sp_15"
+                    app:layout_constraintBottom_toTopOf="@+id/tv_name"
+                    app:layout_constraintHorizontal_bias="0"
+                    app:layout_constraintHorizontal_chainStyle="packed"
+                    app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+                    app:layout_constraintRight_toLeftOf="@+id/iv_attendance_status"
+                    app:layout_constraintTop_toTopOf="@+id/iv_avatar"
+                    app:layout_constraintVertical_chainStyle="packed"
+                    app:layout_constraintWidth_default="wrap"
+                    tools:text="VIP定制课-张豆豆VIP定制课-张豆豆" />
+
+                <ImageView
+                    android:id="@+id/iv_attendance_status"
+                    android:layout_width="wrap_content"
+                    android:layout_height="17.1dp"
+                    android:layout_marginStart="5dp"
+                    android:layout_marginEnd="5dp"
+                    android:adjustViewBounds="true"
+                    android:src="@drawable/icon_course_attendance_truancy"
+                    android:visibility="gone"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+                    app:layout_constraintLeft_toRightOf="@+id/tv_title"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/tv_title" />
+
+                <TextView
+                    android:id="@+id/tv_name"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp"
+                    android:ellipsize="middle"
+                    android:includeFontPadding="false"
+                    android:singleLine="true"
+                    android:textColor="@color/color_999999"
+                    android:textSize="@dimen/sp_13"
+                    app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+                    app:layout_constraintHorizontal_bias="0"
+                    app:layout_constraintHorizontal_chainStyle="packed"
+                    app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+                    app:layout_constraintRight_toLeftOf="@+id/tv_course_name"
+                    app:layout_constraintTop_toBottomOf="@+id/tv_title"
+                    app:layout_constraintWidth_default="wrap"
+                    tools:text="张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆" />
+
+
+                <TextView
+                    android:id="@+id/tv_course_name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="5dp"
+                    android:layout_marginEnd="5dp"
+                    android:background="@drawable/shape_couse_type_text_bg"
+                    android:gravity="center"
+                    android:includeFontPadding="false"
+                    android:paddingStart="4dp"
+                    android:paddingTop="1.5dp"
+                    android:paddingEnd="4dp"
+                    android:paddingBottom="1.5dp"
+                    android:textColor="@color/color_ff8c00"
+                    android:textSize="@dimen/sp_10"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+                    app:layout_constraintLeft_toRightOf="@+id/tv_name"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/tv_name"
+                    tools:text="单簧管" />
+
+
+                <TextView
+                    android:id="@+id/tv_course_status"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/color_999999"
+                    android:textSize="@dimen/sp_14"
+                    app:layout_constraintBottom_toTopOf="@+id/view_line"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    tools:text="未开始" />
+
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/cs_homework"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:orientation="horizontal"
-                android:weightSum="3"
-                tools:text="每个音的指法比较熟练,但是遇到指法变换比较频繁的小节熟练度不足,建议平时可以选择指法变换较大的曲目多加练习!" />
-        </FrameLayout>
-
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/comment_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/dp_14"
-        android:layout_marginTop="12dp"
-        android:layout_marginEnd="@dimen/dp_14"
-        android:background="@drawable/bg_white_10dp"
-        android:paddingBottom="10dp"
-        android:visibility="gone">
-
-        <View
-            android:id="@+id/view_title_line_homework_comment"
-            android:layout_width="4dp"
-            android:layout_height="14dp"
-            android:layout_marginStart="12dp"
-            android:layout_marginTop="13dp"
-            android:background="@drawable/shape_course_title_tag_bg"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <TextView
-            android:id="@+id/tv_homework_comment_title"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:includeFontPadding="false"
-            android:paddingStart="5dp"
-            android:text="作业点评"
-            android:textColor="@color/color_1a1a1a"
-            android:textSize="@dimen/sp_13"
-            app:layout_constraintBottom_toBottomOf="@+id/view_title_line_homework_comment"
-            app:layout_constraintLeft_toRightOf="@+id/view_title_line_homework_comment"
-            app:layout_constraintTop_toTopOf="@+id/view_title_line_homework_comment" />
-
-        <TextView
-            android:id="@+id/tv_homework_set_comment"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:drawableLeft="@drawable/icon_edit_appraisal"
-            android:drawablePadding="3dp"
-            android:includeFontPadding="false"
-            android:paddingEnd="11dp"
-            android:text="@string/comment_str"
-            android:textColor="@color/color_2dc7aa"
-            android:textSize="@dimen/sp_14"
-            android:visibility="visible"
-            app:layout_constraintBottom_toBottomOf="@+id/view_title_line_homework_comment"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/view_title_line_homework_comment" />
-
-        <FrameLayout
-            android:id="@+id/view_homework_comment_content_bg"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="11dp"
-            android:layout_marginTop="11dp"
-            android:layout_marginEnd="11dp"
-            android:background="@drawable/shape_bg_f7f8f9_4dp"
-            android:minHeight="88dp"
-            android:padding="11dp"
-            app:layout_constraintTop_toBottomOf="@+id/view_title_line_homework_comment">
-
-            <TextView
-                android:id="@+id/tv_homework_comment_empty_text"
-                android:layout_width="wrap_content"
+                android:layout_marginTop="12dp"
+                android:background="@drawable/bg_white_10dp"
+                android:paddingBottom="10dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cs_top_info">
+
+                <View
+                    android:id="@+id/view_title_line_homework"
+                    android:layout_width="4dp"
+                    android:layout_height="14dp"
+                    android:layout_marginStart="12dp"
+                    android:layout_marginTop="13dp"
+                    android:background="@drawable/shape_course_title_tag_bg"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/tv_homework_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:includeFontPadding="false"
+                    android:paddingStart="5dp"
+                    android:text="课后作业"
+                    android:textColor="@color/color_1a1a1a"
+                    android:textSize="@dimen/sp_13"
+                    app:layout_constraintBottom_toBottomOf="@+id/view_title_line_homework"
+                    app:layout_constraintLeft_toRightOf="@+id/view_title_line_homework"
+                    app:layout_constraintTop_toTopOf="@+id/view_title_line_homework" />
+
+                <TextView
+                    android:id="@+id/tv_set_homework"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:drawableLeft="@drawable/icon_set_homework"
+                    android:drawablePadding="3dp"
+                    android:includeFontPadding="false"
+                    android:paddingEnd="11dp"
+                    android:text="@string/set_homework_str"
+                    android:textColor="@color/color_2dc7aa"
+                    android:textSize="@dimen/sp_14"
+                    android:visibility="gone"
+                    app:layout_constraintBottom_toBottomOf="@+id/view_title_line_homework"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/view_title_line_homework" />
+
+                <FrameLayout
+                    android:id="@+id/view_homework_content_bg"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="11dp"
+                    android:layout_marginTop="11dp"
+                    android:layout_marginEnd="11dp"
+                    android:background="@drawable/shape_bg_f7f8f9_4dp"
+                    android:minHeight="88dp"
+                    android:padding="11dp"
+                    app:layout_constraintTop_toBottomOf="@+id/view_title_line_homework">
+
+                    <TextView
+                        android:id="@+id/tv_homework_empty_text"
+                        android:layout_width="match_parent"
+                        android:layout_marginEnd="20dp"
+                        android:layout_marginStart="20dp"
+                        android:drawablePadding="10dp"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:drawableLeft="@drawable/icon_homework_empty"
+                        android:gravity="center_vertical"
+                        android:text="@string/please_set_homework_tip"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_13" />
+
+                    <TextView
+                        android:id="@+id/tv_homework_content"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:includeFontPadding="false"
+                        android:textColor="@color/color_333333"
+                        android:textSize="@dimen/sp_13"
+                        android:visibility="gone"
+                        tools:text="每个音的指法比较熟练,但是遇到指法变换比较频繁的小节熟练度不足,建议平时可以选择指法变换较大的曲目多加练习!" />
+                </FrameLayout>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/home_word_video_view"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:drawableLeft="@drawable/icon_homework_comment"
-                android:drawablePadding="8dp"
-                android:gravity="center_vertical"
-                android:text="您尚未点评作业"
-                android:textColor="@color/color_999999"
-                android:textSize="@dimen/sp_13" />
-
-            <TextView
-                android:id="@+id/tv_homework_comment_content"
-                android:layout_width="wrap_content"
+                android:layout_marginTop="12dp"
+                android:background="@drawable/bg_white_10dp"
+                android:paddingBottom="10dp"
+                android:visibility="gone"
+                tools:visibility="visible"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cs_homework">
+
+                <View
+                    android:id="@+id/view_video_work_line"
+                    android:layout_width="4dp"
+                    android:layout_height="14dp"
+                    android:layout_marginStart="12dp"
+                    android:layout_marginTop="13dp"
+                    android:background="@drawable/shape_course_title_tag_bg"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/tv_video_work_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:includeFontPadding="false"
+                    android:paddingStart="5dp"
+                    android:text="视频作业"
+                    android:textColor="@color/color_1a1a1a"
+                    android:textSize="@dimen/sp_13"
+                    android:textStyle="bold"
+                    app:layout_constraintBottom_toBottomOf="@+id/view_video_work_line"
+                    app:layout_constraintLeft_toRightOf="@+id/view_video_work_line"
+                    app:layout_constraintTop_toTopOf="@+id/view_video_work_line" />
+
+                <FrameLayout
+                    android:id="@+id/view_homework_video_content_bg"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="11dp"
+                    android:layout_marginTop="11dp"
+                    android:layout_marginEnd="11dp"
+                    android:background="@drawable/shape_bg_f7f8f9_4dp"
+                    android:minHeight="88dp"
+                    android:padding="11dp"
+                    app:layout_constraintTop_toBottomOf="@+id/view_video_work_line">
+
+                    <TextView
+                        android:id="@+id/tv_homework_video_empty_text"
+                        android:layout_width="match_parent"
+                        android:layout_marginEnd="20dp"
+                        android:layout_marginStart="20dp"
+                        android:drawablePadding="10dp"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:drawableLeft="@drawable/icon_homework_video_empty"
+                        android:gravity="center_vertical"
+                        android:text="@string/student_not_upload_homework_tip"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_13" />
+
+                    <LinearLayout
+                        android:id="@+id/ll_homework_video_content"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_vertical"
+                        android:orientation="horizontal"
+                        android:weightSum="3"
+                        tools:text="每个音的指法比较熟练,但是遇到指法变换比较频繁的小节熟练度不足,建议平时可以选择指法变换较大的曲目多加练习!" />
+                </FrameLayout>
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/comment_view"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:includeFontPadding="false"
-                android:textColor="@color/color_333333"
-                android:textSize="@dimen/sp_13"
+                android:layout_marginTop="12dp"
+                android:background="@drawable/bg_white_10dp"
+                android:paddingBottom="10dp"
                 android:visibility="gone"
-                tools:text="每个音的指法比较熟练,但是遇到指法变换比较频繁的小节熟练度不足,建议平时可以选择指法变换较大的曲目多加练习!" />
-        </FrameLayout>
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-
-</LinearLayout>
+                tools:visibility="visible"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/home_word_video_view">
+
+                <View
+                    android:id="@+id/view_title_line_homework_comment"
+                    android:layout_width="4dp"
+                    android:layout_height="14dp"
+                    android:layout_marginStart="12dp"
+                    android:layout_marginTop="13dp"
+                    android:background="@drawable/shape_course_title_tag_bg"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/tv_homework_comment_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:includeFontPadding="false"
+                    android:paddingStart="5dp"
+                    android:text="作业点评"
+                    android:textColor="@color/color_1a1a1a"
+                    android:textSize="@dimen/sp_13"
+                    app:layout_constraintBottom_toBottomOf="@+id/view_title_line_homework_comment"
+                    app:layout_constraintLeft_toRightOf="@+id/view_title_line_homework_comment"
+                    app:layout_constraintTop_toTopOf="@+id/view_title_line_homework_comment" />
+
+                <TextView
+                    android:id="@+id/tv_homework_set_comment"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:drawableLeft="@drawable/icon_edit_appraisal"
+                    android:drawablePadding="3dp"
+                    android:includeFontPadding="false"
+                    android:paddingEnd="11dp"
+                    android:text="点评作业"
+                    android:textColor="@color/color_2dc7aa"
+                    android:textSize="@dimen/sp_14"
+                    android:visibility="visible"
+                    app:layout_constraintBottom_toBottomOf="@+id/view_title_line_homework_comment"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/view_title_line_homework_comment" />
+
+                <FrameLayout
+                    android:id="@+id/view_homework_comment_content_bg"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="11dp"
+                    android:layout_marginTop="11dp"
+                    android:layout_marginEnd="11dp"
+                    android:background="@drawable/shape_bg_f7f8f9_4dp"
+                    android:minHeight="88dp"
+                    android:padding="11dp"
+                    app:layout_constraintTop_toBottomOf="@+id/view_title_line_homework_comment">
+
+                    <TextView
+                        android:id="@+id/tv_homework_comment_empty_text"
+                        android:layout_width="match_parent"
+                        android:layout_marginEnd="20dp"
+                        android:layout_marginStart="20dp"
+                        android:drawablePadding="10dp"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:drawableLeft="@drawable/icon_homework_comment"
+                        android:gravity="center_vertical"
+                        android:text="您尚未点评作业"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_13" />
+
+                    <TextView
+                        android:id="@+id/tv_homework_comment_content"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:includeFontPadding="false"
+                        android:textColor="@color/color_333333"
+                        android:textSize="@dimen/sp_13"
+                        android:visibility="gone"
+                        tools:text="每个音的指法比较熟练,但是遇到指法变换比较频繁的小节熟练度不足,建议平时可以选择指法变换较大的曲目多加练习!" />
+                </FrameLayout>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+        </LinearLayout>
+    </androidx.core.widget.NestedScrollView>
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 102 - 20
teacher/src/main/res/layout/activity_piano_course_homework_layout.xml

@@ -30,18 +30,50 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:background="@drawable/bg_white_10dp"
-                android:paddingBottom="20dp">
+                android:paddingStart="12dp"
+                android:paddingEnd="12dp"
+                android:paddingBottom="12dp">
 
-                <com.cooleshow.base.widgets.QMUIRadiusImageView
+                <ImageView
+                    android:id="@+id/iv_clock_icon"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="15dp"
+                    android:src="@drawable/icon_clock"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <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" />
+
+                <View
+                    android:id="@+id/view_line"
+                    android:layout_width="0dp"
+                    android:layout_height="1dp"
+                    android:layout_marginTop="15dp"
+                    android:background="@color/color_f2f2f2"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/iv_clock_icon" />
+
+                <de.hdodenhof.circleimageview.CircleImageView
                     android:id="@+id/iv_avatar"
-                    android:layout_width="47dp"
-                    android:layout_height="51dp"
-                    android:layout_marginStart="11dp"
-                    android:layout_marginTop="20dp"
-                    android:src="@drawable/icon_piano_room_course"
-                    app:layout_constraintBottom_toBottomOf="parent"
+                    android:layout_width="40dp"
+                    android:layout_height="40dp"
+                    android:layout_marginTop="12dp"
+                    android:src="@drawable/icon_default_head"
                     app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/view_line"
                     app:qmui_corner_radius="5dp" />
 
                 <TextView
@@ -49,25 +81,61 @@
                     android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="10dp"
-                    android:layout_marginEnd="10dp"
                     android:ellipsize="end"
                     android:includeFontPadding="false"
-                    android:maxLines="2"
+                    android:maxLines="1"
                     android:textColor="@color/color_1a1a1a"
-                    android:textSize="@dimen/sp_16"
-                    android:textStyle="bold"
-                    app:layout_constraintBottom_toTopOf="@+id/tv_course_name"
+                    android:textSize="@dimen/sp_15"
+                    app:layout_constraintBottom_toTopOf="@+id/tv_name"
+                    app:layout_constraintHorizontal_bias="0"
+                    app:layout_constraintHorizontal_chainStyle="packed"
                     app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
-                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintRight_toLeftOf="@+id/iv_attendance_status"
                     app:layout_constraintTop_toTopOf="@+id/iv_avatar"
                     app:layout_constraintVertical_chainStyle="packed"
-                    tools:text="张豆豆张豆豆张豆豆张豆" />
+                    app:layout_constraintWidth_default="wrap"
+                    tools:text="VIP定制课-张豆豆VIP定制课-张豆豆" />
+
+                <ImageView
+                    android:id="@+id/iv_attendance_status"
+                    android:layout_width="wrap_content"
+                    android:layout_height="17.1dp"
+                    android:layout_marginStart="5dp"
+                    android:layout_marginEnd="5dp"
+                    android:adjustViewBounds="true"
+                    android:src="@drawable/icon_course_attendance_truancy"
+                    android:visibility="gone"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+                    app:layout_constraintLeft_toRightOf="@+id/tv_title"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/tv_title" />
+
+                <TextView
+                    android:id="@+id/tv_name"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp"
+                    android:ellipsize="middle"
+                    android:includeFontPadding="false"
+                    android:singleLine="true"
+                    android:textColor="@color/color_999999"
+                    android:textSize="@dimen/sp_13"
+                    app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+                    app:layout_constraintHorizontal_bias="0"
+                    app:layout_constraintHorizontal_chainStyle="packed"
+                    app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+                    app:layout_constraintRight_toLeftOf="@+id/tv_course_name"
+                    app:layout_constraintTop_toBottomOf="@+id/tv_title"
+                    app:layout_constraintWidth_default="wrap"
+                    tools:text="张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆" />
+
 
                 <TextView
                     android:id="@+id/tv_course_name"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="8dp"
+                    android:layout_marginStart="5dp"
+                    android:layout_marginEnd="5dp"
                     android:background="@drawable/shape_couse_type_text_bg"
                     android:gravity="center"
                     android:includeFontPadding="false"
@@ -77,11 +145,25 @@
                     android:paddingBottom="1.5dp"
                     android:textColor="@color/color_ff8c00"
                     android:textSize="@dimen/sp_10"
-                    app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
-                    app:layout_constraintLeft_toLeftOf="@+id/tv_title"
-                    app:layout_constraintTop_toBottomOf="@+id/tv_title"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+                    app:layout_constraintLeft_toRightOf="@+id/tv_name"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/tv_name"
                     tools:text="单簧管" />
 
+
+                <TextView
+                    android:id="@+id/tv_course_status"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/color_999999"
+                    android:textSize="@dimen/sp_14"
+                    app:layout_constraintBottom_toTopOf="@+id/view_line"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    tools:text="未开始" />
+
+
             </androidx.constraintlayout.widget.ConstraintLayout>
 
             <androidx.constraintlayout.widget.ConstraintLayout

+ 119 - 76
teacher/src/main/res/layout/activity_piano_room_detail_layout.xml

@@ -27,102 +27,118 @@
             android:paddingBottom="12dp">
 
             <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/cs_top_info"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:background="@drawable/bg_white_10dp"
-                android:paddingBottom="20dp">
+                android:paddingStart="12dp"
+                android:paddingEnd="12dp"
+                android:paddingBottom="12dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/title_view">
 
                 <ImageView
-                    android:id="@+id/iv_time_icon"
+                    android:id="@+id/iv_clock_icon"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="11dp"
-                    android:layout_marginTop="12dp"
+                    android:layout_marginTop="15dp"
                     android:src="@drawable/icon_clock"
                     app:layout_constraintLeft_toLeftOf="parent"
                     app:layout_constraintTop_toTopOf="parent" />
 
                 <TextView
-                    android:id="@+id/tv_course_time"
+                    android:id="@+id/tv_time"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
+                    android:layout_marginStart="6dp"
                     android:includeFontPadding="false"
-                    android:paddingStart="7dp"
                     android:textColor="@color/color_666666"
                     android:textSize="@dimen/sp_13"
-                    app:layout_constraintBottom_toBottomOf="@+id/iv_time_icon"
-                    app:layout_constraintLeft_toRightOf="@+id/iv_time_icon"
-                    app:layout_constraintTop_toTopOf="@+id/iv_time_icon"
+                    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_course_status"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginEnd="11dp"
-                    android:text="已结束"
-                    android:textColor="@color/color_999999"
-                    android:textSize="@dimen/sp_14"
-                    app:layout_constraintBottom_toBottomOf="@+id/iv_time_icon"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="@+id/iv_time_icon" />
-
                 <View
                     android:id="@+id/view_line"
-                    android:layout_width="match_parent"
-                    android:layout_height="1px"
-                    android:layout_marginTop="10dp"
+                    android:layout_width="0dp"
+                    android:layout_height="1dp"
+                    android:layout_marginTop="15dp"
                     android:background="@color/color_f2f2f2"
-                    app:layout_constraintTop_toBottomOf="@+id/iv_time_icon" />
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/iv_clock_icon" />
 
-                <ImageView
-                    android:src="@drawable/icon_piano_room_course"
+                <de.hdodenhof.circleimageview.CircleImageView
                     android:id="@+id/iv_avatar"
-                    android:layout_width="54dp"
-                    android:layout_height="54dp"
-                    android:layout_marginStart="11dp"
-                    android:layout_marginTop="20dp"
-                    android:gravity="center"
-                    android:textColor="@color/white"
-                    android:textSize="@dimen/sp_14"
-                    app:layout_constraintBottom_toBottomOf="parent"
+                    android:layout_width="40dp"
+                    android:layout_height="40dp"
+                    android:layout_marginTop="12dp"
+                    android:src="@drawable/icon_piano_room_course"
                     app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toBottomOf="@+id/view_line" />
+                    app:layout_constraintTop_toBottomOf="@+id/view_line"
+                    app:qmui_corner_radius="5dp" />
 
                 <TextView
                     android:id="@+id/tv_title"
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="10dp"
-                    android:layout_marginEnd="10dp"
                     android:ellipsize="end"
                     android:includeFontPadding="false"
-                    android:maxLines="2"
+                    android:maxLines="1"
                     android:textColor="@color/color_1a1a1a"
-                    android:textSize="@dimen/sp_16"
-                    android:textStyle="bold"
-                    app:layout_constraintBottom_toTopOf="@+id/tv_course_name"
+                    android:textSize="@dimen/sp_15"
+                    app:layout_constraintBottom_toTopOf="@+id/tv_name"
+                    app:layout_constraintHorizontal_bias="0"
+                    app:layout_constraintHorizontal_chainStyle="packed"
                     app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+                    app:layout_constraintRight_toLeftOf="@+id/iv_attendance_status"
                     app:layout_constraintTop_toTopOf="@+id/iv_avatar"
                     app:layout_constraintVertical_chainStyle="packed"
-                    tools:text="张豆豆张豆豆张豆豆张豆" />
+                    app:layout_constraintWidth_default="wrap"
+                    tools:text="VIP定制课-张豆豆VIP定制课-张豆豆" />
 
                 <ImageView
-                    android:id="@+id/iv_go_chat"
+                    android:id="@+id/iv_attendance_status"
                     android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="8dp"
-                    android:src="@drawable/icon_chat_small"
+                    android:layout_height="17.1dp"
+                    android:layout_marginStart="5dp"
+                    android:layout_marginEnd="5dp"
+                    android:adjustViewBounds="true"
+                    android:src="@drawable/icon_course_attendance_truancy"
+                    android:visibility="gone"
                     app:layout_constraintBottom_toBottomOf="@+id/tv_title"
                     app:layout_constraintLeft_toRightOf="@+id/tv_title"
+                    app:layout_constraintRight_toRightOf="parent"
                     app:layout_constraintTop_toTopOf="@+id/tv_title" />
 
+                <TextView
+                    android:id="@+id/tv_name"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp"
+                    android:ellipsize="middle"
+                    android:includeFontPadding="false"
+                    android:singleLine="true"
+                    android:textColor="@color/color_999999"
+                    android:textSize="@dimen/sp_13"
+                    app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+                    app:layout_constraintHorizontal_bias="0"
+                    app:layout_constraintHorizontal_chainStyle="packed"
+                    app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+                    app:layout_constraintRight_toLeftOf="@+id/tv_course_name"
+                    app:layout_constraintTop_toBottomOf="@+id/tv_title"
+                    app:layout_constraintWidth_default="wrap"
+                    tools:text="张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆" />
+
 
                 <TextView
                     android:id="@+id/tv_course_name"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="8dp"
+                    android:layout_marginStart="5dp"
+                    android:layout_marginEnd="5dp"
                     android:background="@drawable/shape_couse_type_text_bg"
                     android:gravity="center"
                     android:includeFontPadding="false"
@@ -132,32 +148,24 @@
                     android:paddingBottom="1.5dp"
                     android:textColor="@color/color_ff8c00"
                     android:textSize="@dimen/sp_10"
-                    app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
-                    app:layout_constraintLeft_toLeftOf="@+id/tv_title"
-                    app:layout_constraintTop_toBottomOf="@+id/tv_title"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+                    app:layout_constraintLeft_toRightOf="@+id/tv_name"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/tv_name"
                     tools:text="单簧管" />
 
-                <View
-                    android:id="@+id/view_line2"
-                    android:layout_width="1dp"
-                    android:layout_height="12dp"
-                    android:layout_marginStart="8dp"
-                    android:background="@color/color_dedede"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_course_name"
-                    app:layout_constraintLeft_toRightOf="@+id/tv_course_name"
-                    app:layout_constraintTop_toTopOf="@+id/tv_course_name" />
 
                 <TextView
-                    android:id="@+id/tv_course_people_num"
+                    android:id="@+id/tv_course_status"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="8dp"
-                    android:text="0人"
                     android:textColor="@color/color_999999"
                     android:textSize="@dimen/sp_14"
-                    app:layout_constraintBottom_toBottomOf="@+id/tv_course_name"
-                    app:layout_constraintLeft_toRightOf="@+id/view_line2"
-                    app:layout_constraintTop_toTopOf="@+id/tv_course_name" />
+                    app:layout_constraintBottom_toTopOf="@+id/view_line"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    tools:text="未开始" />
+
 
             </androidx.constraintlayout.widget.ConstraintLayout>
 
@@ -221,13 +229,15 @@
 
                     <TextView
                         android:id="@+id/tv_homework_empty_text"
-                        android:layout_width="wrap_content"
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_gravity="center"
+                        android:layout_marginStart="20dp"
+                        android:layout_marginEnd="20dp"
                         android:drawableLeft="@drawable/icon_homework_empty"
-                        android:drawablePadding="8dp"
+                        android:drawablePadding="10dp"
                         android:gravity="center_vertical"
-                        android:text="课程结束之后记得布置作业哦!"
+                        android:text="@string/please_set_homework_tip"
                         android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_13" />
 
@@ -243,24 +253,56 @@
                 </FrameLayout>
             </androidx.constraintlayout.widget.ConstraintLayout>
 
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/recyclerView"
+            <androidx.constraintlayout.widget.ConstraintLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:overScrollMode="never"
-                android:scrollbars="horizontal" />
+                android:layout_marginTop="12dp"
+                android:background="@drawable/bg_white_10dp">
+
+                <View
+                    android:id="@+id/view_title_line_student"
+                    android:layout_width="4dp"
+                    android:layout_height="14dp"
+                    android:layout_marginStart="12dp"
+                    android:layout_marginTop="13dp"
+                    android:background="@drawable/shape_course_title_tag_bg"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/tv_student_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:includeFontPadding="false"
+                    android:paddingStart="5dp"
+                    android:text="上课学生"
+                    android:textColor="@color/color_1a1a1a"
+                    android:textSize="@dimen/sp_13"
+                    app:layout_constraintBottom_toBottomOf="@+id/view_title_line_student"
+                    app:layout_constraintLeft_toRightOf="@+id/view_title_line_student"
+                    app:layout_constraintTop_toTopOf="@+id/view_title_line_student" />
+
+                <androidx.recyclerview.widget.RecyclerView
+                    android:id="@+id/recyclerView"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:overScrollMode="never"
+                    android:scrollbars="horizontal"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/tv_student_title" />
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
 
             <View
-                android:visibility="gone"
                 android:id="@+id/bottom_view"
                 android:layout_width="match_parent"
-                android:layout_height="@dimen/dp_100"/>
+                android:layout_height="@dimen/dp_100"
+                android:visibility="gone" />
         </LinearLayout>
     </androidx.core.widget.NestedScrollView>
 
 
     <TextView
-        android:visibility="gone"
         android:id="@+id/tv_enter_room"
         android:layout_width="match_parent"
         android:layout_height="44dp"
@@ -271,6 +313,7 @@
         android:gravity="center"
         android:text="进入教室"
         android:textColor="@color/white"
+        android:visibility="gone"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent" />

+ 22 - 10
teacher/src/main/res/layout/item_piano_room_student_layout.xml

@@ -4,16 +4,15 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:background="@drawable/bg_white_10dp"
-    android:layout_marginTop="@dimen/dp_10"
     android:paddingStart="12dp"
-    android:paddingTop="14dp"
-    android:paddingBottom="14dp">
+    android:paddingEnd="12dp">
 
     <de.hdodenhof.circleimageview.CircleImageView
         android:id="@+id/iv_avatar"
-        android:layout_width="51dp"
-        android:layout_height="51dp"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginBottom="12dp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent"
@@ -21,22 +20,28 @@
 
     <TextView
         android:id="@+id/tv_name"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="9dp"
+        android:layout_marginEnd="5dp"
+        android:ellipsize="end"
         android:includeFontPadding="false"
+        android:linksClickable="false"
+        android:maxLines="1"
         android:textColor="@color/color_1a1a1a"
         android:textSize="@dimen/sp_15"
         app:layout_constraintBottom_toTopOf="@+id/tv_course_name"
         app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
-        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintRight_toLeftOf="@+id/tv_submit_tip"
+        app:layout_constraintTop_toTopOf="@+id/iv_avatar"
+        app:layout_constraintVertical_chainStyle="packed"
         tools:text="张静怡" />
 
     <TextView
         android:id="@+id/tv_course_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="2dp"
+        android:layout_marginTop="3dp"
         android:background="@drawable/shape_couse_type_text_bg"
         android:gravity="center"
         android:includeFontPadding="false"
@@ -68,9 +73,16 @@
         android:id="@+id/iv_arrow"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="18dp"
         android:src="@drawable/icon_arrow_right_grey"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
+
+    <View
+        android:id="@+id/view_line"
+        android:layout_width="match_parent"
+        android:layout_height="1px"
+        android:background="@color/color_f2f2f2"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent" />
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 2 - 0
teacher/src/main/res/values/strings.xml

@@ -73,4 +73,6 @@
     <string name="mine_course_search_tip">请输入课程组名称</string>
     <string name="enter_room_tip_str">进入教室</string>
     <string name="will_start_tip_str">即将开始</string>
+    <string name="please_set_homework_tip">课程已结束,请布置作业</string>
+    <string name="student_not_upload_homework_tip">学员尚未上传作业视频</string>
 </resources>