Commit 3e1556f3 authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :小象省钱
[实现方案] :加入error图
parent 9a7030d9
......@@ -36,9 +36,9 @@ class DetailBannerAdapter : PagerAdapter {
val view = LayoutInflater.from(AppContext.get()).inflate(R.layout.item_layout_detail_banner, null)
val bg = view.findViewById<ImageView>(R.id.id_img_detail_banner_bg)
if(data.startsWith("//img")){
Glide.with(AppContext.get()).load("https:"+data).into(bg)
Glide.with(AppContext.get()).load("https:"+data).placeholder(R.drawable.img_goods_error).into(bg)
}else{
Glide.with(AppContext.get()).load(data).into(bg)
Glide.with(AppContext.get()).load(data).placeholder(R.drawable.img_goods_error).into(bg)
}
container.addView(view)// 添加页卡
return view
......
......@@ -33,7 +33,7 @@ class TopPagerAdapter : PagerAdapter {
val view = LayoutInflater.from(AppContext.get()).inflate(R.layout.item_goods_top, null)
val bg = view.findViewById<ImageView>(R.id.id_img_main)
// val lottie = view.findViewById<LottieAnimationView>(R.id.id_lottie_daoguang)
Glide.with(AppContext.get()).load(data?.mainImage).into(bg)
Glide.with(AppContext.get()).load(data?.mainImage).placeholder(R.drawable.img_goods_error).into(bg)
container.addView(view)// 添加页卡
return view
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment