|
@@ -17,6 +17,7 @@ import com.cooleshow.base.utils.GlideUtils;
|
|
|
import com.cooleshow.base.utils.UiUtils;
|
|
|
import com.cooleshow.student.R;
|
|
|
import com.cooleshow.student.bean.HomeworkListBean;
|
|
|
+import com.cooleshow.student.constants.CourseConstants;
|
|
|
import com.cooleshow.student.constants.HomeWorkConstants;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -46,8 +47,16 @@ public class HomeworkAdapter extends BaseQuickAdapter<HomeworkListBean.RowsBean,
|
|
|
ImageView im_header = helper.getView(R.id.im_header);
|
|
|
TextView tv_name = helper.getView(R.id.tv_name);
|
|
|
RecyclerView rv_mark = helper.getView(R.id.rv_mark);
|
|
|
- GlideUtils.INSTANCE.loadImage(getContext(), item.teacherAvatar, im_header, R.drawable.icon_teacher_default_head);
|
|
|
- tv_name.setText(item.teacherName);
|
|
|
+ if (TextUtils.equals(item.type, CourseConstants.OTHER_COURSE)) {
|
|
|
+ //陪练课
|
|
|
+ GlideUtils.INSTANCE.loadImage(getContext(), item.teacherAvatar, im_header, R.drawable.icon_teacher_default_head);
|
|
|
+ tv_name.setText(item.teacherName);
|
|
|
+ } else {
|
|
|
+ //琴房课
|
|
|
+ im_header.setImageResource(R.drawable.icon_piano_room_course);
|
|
|
+ tv_name.setText(UiUtils.getPianoCourseName(item.courseGroupName, item.classNum));
|
|
|
+ }
|
|
|
+
|
|
|
if (!TextUtils.isEmpty(item.subjectName)) {
|
|
|
rv_mark.setVisibility(View.VISIBLE);
|
|
|
List<String> markList = new ArrayList<>();
|
|
@@ -78,12 +87,12 @@ public class HomeworkAdapter extends BaseQuickAdapter<HomeworkListBean.RowsBean,
|
|
|
tv_join_state.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff4e19));
|
|
|
}
|
|
|
|
|
|
- if (TextUtils.equals(item.homeworkStatus, HomeWorkConstants.COURSE_HOMEWORK_UN_COMMIT)) {
|
|
|
+ if (TextUtils.equals(item.homeworkStatus, HomeWorkConstants.COURSE_HOMEWORK_UN_COMMIT)) {
|
|
|
tv_submit.setText("去提交");
|
|
|
tv_submit.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
|
|
|
tv_submit.setBackgroundResource(R.drawable.bg_2dc7aa_border);
|
|
|
- tv_submit.setVisibility(View.VISIBLE);
|
|
|
- }else{
|
|
|
+ tv_submit.setVisibility(View.VISIBLE);
|
|
|
+ } else {
|
|
|
tv_submit.setVisibility(View.GONE);
|
|
|
}
|
|
|
|
|
@@ -95,7 +104,7 @@ public class HomeworkAdapter extends BaseQuickAdapter<HomeworkListBean.RowsBean,
|
|
|
tv_state.setVisibility(View.VISIBLE);
|
|
|
tv_state.setText("已点评");
|
|
|
tv_state.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
tv_state.setVisibility(View.GONE);
|
|
|
}
|
|
|
}
|