diff --git a/live/src/main/java/com/yunbao/live/views/CustomViewHolder.java b/live/src/main/java/com/yunbao/live/views/CustomViewHolder.java index 766aef76d..085d8de5a 100644 --- a/live/src/main/java/com/yunbao/live/views/CustomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/CustomViewHolder.java @@ -11,6 +11,7 @@ import android.widget.TextView; import com.bumptech.glide.Glide; import com.ms.banner.holder.BannerViewHolder; import com.yunbao.common.bean.BannerBean; +import com.yunbao.common.utils.StringUtil; import com.yunbao.common.views.weight.ProgressView; import com.yunbao.live.R; @@ -63,9 +64,11 @@ public class CustomViewHolder implements BannerViewHolder { currentAssist.setText(String.valueOf(currentAssistNum)); title.setText(String.format(context.getString(R.string.star_change),data.getModel().getTaskNum())); } else { - String imagerUrl = data.getImageUrl().replace("qny", "downs"); - Glide.with(context).load(imagerUrl).into(bannerBack); - startContext.setVisibility(View.GONE); + if(data!=null&&!StringUtil.isEmpty(data.getImageUrl())) { + String imagerUrl = data.getImageUrl().replace("qny", "downs"); + Glide.with(context).load(imagerUrl).into(bannerBack); + startContext.setVisibility(View.GONE); + } } return contextView;