Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
bf58ddf5
Commit
bf58ddf5
authored
Jul 12, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 商品列表图片加载逻辑
parent
fc62b35f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
19 deletions
+8
-19
CommodityListAdapter.kt
...oquan/commodity/ui/coupon/adapter/CommodityListAdapter.kt
+0
-15
commodity_item_commodity_audit_list.xml
...c/main/res/layout/commodity_item_commodity_audit_list.xml
+2
-1
commodity_item_commodity_offline_list.xml
...main/res/layout/commodity_item_commodity_offline_list.xml
+2
-1
commodity_item_commodity_online_list.xml
.../main/res/layout/commodity_item_commodity_online_list.xml
+2
-1
commodity_item_commodity_reject_list.xml
.../main/res/layout/commodity_item_commodity_reject_list.xml
+2
-1
No files found.
Components/commodity/src/main/java/com/yidian/shenghuoquan/commodity/ui/coupon/adapter/CommodityListAdapter.kt
View file @
bf58ddf5
...
...
@@ -58,21 +58,6 @@ class CommodityListAdapter(private val context: Context, private val status: Com
.
apply
(
RequestOptions
().
transform
(
CenterCrop
(),
RoundedCorners
(
DensityUtil
.
dp2px
(
corner
.
toFloat
()))))
.
into
(
target
)
}
/**
* 加载圆角图片
* @param urlList 图片urlList
* @param corner 圆角值
* @param target 目标ImageView
*/
@BindingAdapter
(
value
=
[
"urlList"
,
"corner"
],
requireAll
=
true
)
@JvmStatic
fun
loadRoundCornerImage
(
target
:
ImageView
,
urlList
:
List
<
String
>,
corner
:
Int
=
12
)
{
if
(
urlList
.
isEmpty
())
return
Glide
.
with
(
target
.
context
).
load
(
urlList
[
0
])
.
apply
(
RequestOptions
().
transform
(
CenterCrop
(),
RoundedCorners
(
DensityUtil
.
dp2px
(
corner
.
toFloat
()))))
.
into
(
target
)
}
}
/**
...
...
Components/commodity/src/main/res/layout/commodity_item_commodity_audit_list.xml
View file @
bf58ddf5
...
...
@@ -26,10 +26,11 @@
android:id=
"@+id/iv_commodity_pic"
android:layout_width=
"@dimen/dp80"
android:layout_height=
"@dimen/dp80"
android:scaleType=
"centerCrop"
app:corner=
"@{12}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:url
List=
"@{data.descPicUrlList
}"
app:url
=
"@{data.descPicUrlList[0]
}"
tools:src=
"@mipmap/news_icon"
/>
<TextView
...
...
Components/commodity/src/main/res/layout/commodity_item_commodity_offline_list.xml
View file @
bf58ddf5
...
...
@@ -26,10 +26,11 @@
android:id=
"@+id/iv_commodity_pic"
android:layout_width=
"@dimen/dp80"
android:layout_height=
"@dimen/dp80"
android:scaleType=
"centerCrop"
app:corner=
"@{12}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:url
List=
"@{data.descPicUrlList
}"
app:url
=
"@{data.descPicUrlList[0]
}"
tools:src=
"@mipmap/news_icon"
/>
<TextView
...
...
Components/commodity/src/main/res/layout/commodity_item_commodity_online_list.xml
View file @
bf58ddf5
...
...
@@ -26,10 +26,11 @@
android:id=
"@+id/iv_commodity_pic"
android:layout_width=
"@dimen/dp80"
android:layout_height=
"@dimen/dp80"
android:scaleType=
"centerCrop"
app:corner=
"@{12}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:url
List=
"@{data.descPicUrlList
}"
app:url
=
"@{data.descPicUrlList[0]
}"
tools:src=
"@mipmap/news_icon"
/>
<TextView
...
...
Components/commodity/src/main/res/layout/commodity_item_commodity_reject_list.xml
View file @
bf58ddf5
...
...
@@ -26,10 +26,11 @@
android:id=
"@+id/iv_commodity_pic"
android:layout_width=
"@dimen/dp80"
android:layout_height=
"@dimen/dp80"
android:scaleType=
"centerCrop"
app:corner=
"@{12}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:url
List=
"@{data.descPicUrlList
}"
app:url
=
"@{data.descPicUrlList[0]
}"
tools:src=
"@mipmap/news_icon"
/>
<TextView
...
...
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