Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
xxsq
Commits
3e1556f3
Commit
3e1556f3
authored
May 30, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :小象省钱 [实现方案] :加入error图
parent
9a7030d9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
DetailBannerAdapter.kt
...n/java/com/zxbw/modulemain/adapter/DetailBannerAdapter.kt
+2
-2
TopPagerAdapter.kt
...n/java/com/zxbw/modulemain/box/adapter/TopPagerAdapter.kt
+1
-1
img_goods_error.png
moduleMain/src/main/res/drawable-xhdpi/img_goods_error.png
+0
-0
No files found.
moduleMain/src/main/java/com/zxbw/modulemain/adapter/DetailBannerAdapter.kt
View file @
3e1556f3
...
...
@@ -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
...
...
moduleMain/src/main/java/com/zxbw/modulemain/box/adapter/TopPagerAdapter.kt
View file @
3e1556f3
...
...
@@ -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
}
...
...
moduleMain/src/main/res/drawable-xhdpi/img_goods_error.png
0 → 100644
View file @
3e1556f3
14.5 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment