|
@@ -33,24 +33,24 @@ public class MineLiveCourseAdapter extends BaseQuickAdapter<MineLiveCourseListBe
|
|
|
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, MineLiveCourseListBean.RowsBean item) {
|
|
|
- if(item == null){
|
|
|
+ if (item == null) {
|
|
|
return;
|
|
|
}
|
|
|
ImageView im_pic = helper.getView(R.id.im_pic);
|
|
|
GlideUtils.INSTANCE.loadImage(getContext(), item.backgroundPic, im_pic);
|
|
|
- TextView tv_subject_name=helper.getView(R.id.tv_subject_name);
|
|
|
+ TextView tv_subject_name = helper.getView(R.id.tv_subject_name);
|
|
|
tv_subject_name.setText(item.courseGroupName);
|
|
|
- ImageView im_header=helper.getView(R.id.im_header);
|
|
|
- GlideUtils.INSTANCE.loadImage(getContext(), item.avatar, im_header,R.drawable.icon_teacher_default_head);
|
|
|
- TextView tv_teacher_name=helper.getView(R.id.tv_teacher_name);
|
|
|
+ ImageView im_header = helper.getView(R.id.im_header);
|
|
|
+ GlideUtils.INSTANCE.loadImage(getContext(), item.avatar, im_header, R.drawable.icon_teacher_default_head);
|
|
|
+ TextView tv_teacher_name = helper.getView(R.id.tv_teacher_name);
|
|
|
tv_teacher_name.setText(item.teacherName);
|
|
|
- TextView tv_student_count=helper.getView(R.id.tv_student_count);
|
|
|
- tv_student_count.setText(item.studentCount+"人已购买");
|
|
|
- TextView tv_date=helper.getView(R.id.tv_date);
|
|
|
- tv_date.setText(TextUtils.isEmpty(item.courseStartTime)?"":TimeUtils.date2String(TimeUtils.string2Date(item.courseStartTime),"yyyy-MM-dd HH:mm"));
|
|
|
- TextView tv_price=helper.getView(R.id.tv_price);
|
|
|
+ TextView tv_student_count = helper.getView(R.id.tv_student_count);
|
|
|
+ tv_student_count.setText(UiUtils.getBuyNumTip(item.coursePrice, item.studentCount));
|
|
|
+ TextView tv_date = helper.getView(R.id.tv_date);
|
|
|
+ tv_date.setText(TextUtils.isEmpty(item.courseStartTime) ? "" : TimeUtils.date2String(TimeUtils.string2Date(item.courseStartTime), "yyyy-MM-dd HH:mm"));
|
|
|
+ TextView tv_price = helper.getView(R.id.tv_price);
|
|
|
tv_price.setText(UiUtils.getLiveCoursePriceText(item.coursePrice, item.courseNum));
|
|
|
- helper.setText(R.id.subject_name,item.subjectName);
|
|
|
+ helper.setText(R.id.subject_name, item.subjectName);
|
|
|
}
|
|
|
|
|
|
@NonNull
|