修复星级挑战data.getImageUrl()为空导致的问题

This commit is contained in:
zlzw 2022-11-28 16:29:21 +08:00
parent 733678532a
commit 718d4a5d2f

View File

@ -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,10 +64,12 @@ public class CustomViewHolder implements BannerViewHolder<BannerBean> {
currentAssist.setText(String.valueOf(currentAssistNum));
title.setText(String.format(context.getString(R.string.star_change),data.getModel().getTaskNum()));
} else {
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;
}