|
@@ -56,16 +56,17 @@ class CourseTableListAdapter(layoutResId: Int) :
|
|
|
//subjectName
|
|
|
baseViewHolder.setText(R.id.tv_course_name, data?.subjectName);
|
|
|
if (TextUtils.equals(OTHER_COURSE, data?.courseType)) {
|
|
|
- //陪练课
|
|
|
+ //VIP课
|
|
|
GlideUtils.loadImage(
|
|
|
context,
|
|
|
data!!.cover,
|
|
|
ivAvatar,
|
|
|
R.drawable.icon_teacher_default_head
|
|
|
)
|
|
|
+ tv_vip_course_tag.text = "趣纠课"
|
|
|
viewLine2.setVisible(false)
|
|
|
tvBuyNum.setVisible(false)
|
|
|
- tv_vip_course_tag.setVisible(false)
|
|
|
+ tv_vip_course_tag.setVisible(true)
|
|
|
} else if (TextUtils.equals(PIANO_ROOM_COURSE, data?.courseType)) {
|
|
|
//琴房课
|
|
|
ivAvatar.setImageResource(R.drawable.icon_piano_room_course)
|
|
@@ -81,7 +82,7 @@ class CourseTableListAdapter(layoutResId: Int) :
|
|
|
ivAvatar,
|
|
|
R.drawable.icon_teacher_default_head
|
|
|
)
|
|
|
- tv_vip_course_tag.text = "VIP定制课-" + data?.name
|
|
|
+ tv_vip_course_tag.text = "VIP定制课"
|
|
|
viewLine2.setVisible(false)
|
|
|
tvBuyNum.setVisible(false)
|
|
|
tv_vip_course_tag.setVisible(true)
|
|
@@ -98,23 +99,31 @@ class CourseTableListAdapter(layoutResId: Int) :
|
|
|
when (data?.status) {
|
|
|
NOT_START -> {
|
|
|
//未开始
|
|
|
+ baseViewHolder.setText(R.id.tv_course_status, "未开始")
|
|
|
+ baseViewHolder.setTextColor(
|
|
|
+ R.id.tv_course_status,
|
|
|
+ context.resources.getColor(com.cooleshow.base.R.color.color_ff802c)
|
|
|
+ )
|
|
|
if (isCanShowEnterBt(data)) {
|
|
|
tvCourseStatusBt.setVisible(true)
|
|
|
tvCourseStatusBt.text = "进入教室"
|
|
|
tvCourseStatusBt.setBackgroundResource(R.drawable.shape_course_status_ing);
|
|
|
tvCourseStatusBt.setTextColor(context.resources.getColor(R.color.white))
|
|
|
} else {
|
|
|
- //直播课隐藏
|
|
|
- tvCourseStatusBt.setVisible(false)
|
|
|
+ //直播课 琴房课 隐藏 20241125与IOS逻辑一致
|
|
|
+ if (TextUtils.equals(data.courseType, LIVE_COURSE) || TextUtils.equals(
|
|
|
+ data.courseType,
|
|
|
+ PIANO_ROOM_COURSE
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ tvCourseStatusBt.setVisible(false)
|
|
|
+ } else {
|
|
|
+ tvCourseStatusBt.setVisible(true)
|
|
|
+ }
|
|
|
+ tvCourseStatusBt.text = "调课"
|
|
|
+ tvCourseStatusBt.setBackgroundResource(R.drawable.shape_course_status_normal);
|
|
|
+ tvCourseStatusBt.setTextColor(context.resources.getColor(com.cooleshow.base.R.color.color_2dc7aa))
|
|
|
}
|
|
|
- baseViewHolder.setText(R.id.tv_course_status, "未开始")
|
|
|
- baseViewHolder.setTextColor(
|
|
|
- R.id.tv_course_status,
|
|
|
- context.resources.getColor(com.cooleshow.base.R.color.color_ff802c)
|
|
|
- )
|
|
|
- tvCourseStatusBt.text = "调课"
|
|
|
- tvCourseStatusBt.setBackgroundResource(R.drawable.shape_course_status_normal);
|
|
|
- tvCourseStatusBt.setTextColor(context.resources.getColor(com.cooleshow.base.R.color.color_2dc7aa))
|
|
|
}
|
|
|
|
|
|
ING -> {
|
|
@@ -160,6 +169,10 @@ class CourseTableListAdapter(layoutResId: Int) :
|
|
|
return false;
|
|
|
}
|
|
|
when (data.courseType) {
|
|
|
+ VIP_COURSE -> {
|
|
|
+ return isLessThanTargetTime(configBean!!.vipStartTime, data.startTime);
|
|
|
+ }
|
|
|
+
|
|
|
OTHER_COURSE -> {
|
|
|
return isLessThanTargetTime(configBean!!.practiceStartTime, data.startTime);
|
|
|
}
|