|
@@ -1,6 +1,7 @@
|
|
|
package com.cooleshow.student.adapter;
|
|
|
|
|
|
import android.os.Build;
|
|
|
+import android.text.TextUtils;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.TextView;
|
|
|
|
|
@@ -34,7 +35,11 @@ public class HomeTeacherStyleAdapter extends BaseQuickAdapter<HomeStyleBean.Rows
|
|
|
ImageView im_teacher_header = helper.getView(R.id.im_teacher_header);
|
|
|
TextView tv_teacher_name = helper.getView(R.id.tv_teacher_name);
|
|
|
TextView tv_watch_count = helper.getView(R.id.tv_watch_count);
|
|
|
- GlideUtils.INSTANCE.loadVideoThumbnail(getContext(), item.videoUrl, im_pic);
|
|
|
+ if (TextUtils.isEmpty(item.cover)) {
|
|
|
+ GlideUtils.INSTANCE.loadVideoThumbnail(getContext(), item.videoUrl, im_pic);
|
|
|
+ } else {
|
|
|
+ GlideUtils.INSTANCE.loadImage(getContext(), item.cover, im_pic, com.cooleshow.base.R.drawable.bg_video_placeholder);
|
|
|
+ }
|
|
|
tv_title.setText(item.describe);
|
|
|
GlideUtils.INSTANCE.loadImage(getContext(), item.avatar, im_teacher_header);
|
|
|
tv_teacher_name.setText(item.username);
|