修复星级挑战data.getImageUrl()为空导致的问题
This commit is contained in:
parent
733678532a
commit
718d4a5d2f
@ -11,6 +11,7 @@ import android.widget.TextView;
|
|||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.ms.banner.holder.BannerViewHolder;
|
import com.ms.banner.holder.BannerViewHolder;
|
||||||
import com.yunbao.common.bean.BannerBean;
|
import com.yunbao.common.bean.BannerBean;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.views.weight.ProgressView;
|
import com.yunbao.common.views.weight.ProgressView;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
|
|
||||||
@ -63,10 +64,12 @@ public class CustomViewHolder implements BannerViewHolder<BannerBean> {
|
|||||||
currentAssist.setText(String.valueOf(currentAssistNum));
|
currentAssist.setText(String.valueOf(currentAssistNum));
|
||||||
title.setText(String.format(context.getString(R.string.star_change),data.getModel().getTaskNum()));
|
title.setText(String.format(context.getString(R.string.star_change),data.getModel().getTaskNum()));
|
||||||
} else {
|
} else {
|
||||||
|
if(data!=null&&!StringUtil.isEmpty(data.getImageUrl())) {
|
||||||
String imagerUrl = data.getImageUrl().replace("qny", "downs");
|
String imagerUrl = data.getImageUrl().replace("qny", "downs");
|
||||||
Glide.with(context).load(imagerUrl).into(bannerBack);
|
Glide.with(context).load(imagerUrl).into(bannerBack);
|
||||||
startContext.setVisibility(View.GONE);
|
startContext.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return contextView;
|
return contextView;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user