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
bc8ad372
Commit
bc8ad372
authored
Sep 03, 2021
by
chengkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加载圆角
parent
ad1ff589
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
16 deletions
+21
-16
OrderListAdapter.kt
...idian/shenghuoquan/buserorder/adapter/OrderListAdapter.kt
+13
-6
OrderListActivity.kt
...om/yidian/shenghuoquan/buserorder/ui/OrderListActivity.kt
+1
-1
glide_pic.jpeg
...ts/BUserOrder/src/main/res/drawable-xxhdpi/glide_pic.jpeg
+0
-0
border_recycle_order_item.xml
...erOrder/src/main/res/layout/border_recycle_order_item.xml
+7
-9
No files found.
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/adapter/OrderListAdapter.kt
View file @
bc8ad372
...
...
@@ -7,6 +7,9 @@ import android.widget.LinearLayout
import
android.widget.RelativeLayout
import
android.widget.TextView
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.resource.bitmap.CenterCrop
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
import
com.bumptech.glide.request.RequestOptions
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.viewholder.BaseViewHolder
import
com.yidian.bcommon.constant.IntentConstants
...
...
@@ -19,6 +22,10 @@ import com.yidian.shenghuoquan.buserorder.view.RoundImageView
import
com.yidian.xpage.XPageManager
class
OrderListAdapter
:
BaseQuickAdapter
<
OrderWebData
,
BaseViewHolder
>(
R
.
layout
.
border_recycle_order_item
){
companion
object
{
const
val
roundRadus
=
40
}
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
OrderWebData
)
{
mapDataToHoder
(
item
,
holder
)
}
...
...
@@ -40,7 +47,7 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image2
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
.
bitmapTransform
(
RoundedCorners
(
roundRadus
))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
}
}
2
->
{
...
...
@@ -48,8 +55,8 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
1
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
1
].
desc_pic_url
)).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
.
bitmapTransform
(
RoundedCorners
(
roundRadus
))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
1
].
desc_pic_url
)).
apply
(
RequestOptions
.
bitmapTransform
(
RoundedCorners
(
roundRadus
))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
}
}
else
->
{
...
...
@@ -57,9 +64,9 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_good3_name
).
text
=
data
.
order_item_list
[
2
].
goods_name
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
1
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
2
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
1
].
desc_pic_url
)).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
2
].
desc_pic_url
)).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image3
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
.
bitmapTransform
(
RoundedCorners
(
roundRadus
))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
1
].
desc_pic_url
)).
apply
(
RequestOptions
.
bitmapTransform
(
RoundedCorners
(
roundRadus
))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
2
].
desc_pic_url
)).
apply
(
RequestOptions
.
bitmapTransform
(
RoundedCorners
(
roundRadus
))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image3
))
}
}
}
...
...
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/ui/OrderListActivity.kt
View file @
bc8ad372
...
...
@@ -57,7 +57,7 @@ class OrderListActivity : BaseMvvmActivity<BorderActivityOrderListBinding, Order
binding
.
tvOrderlistAll
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
))
binding
.
tvOrderlistAll
.
setCompoundDrawables
(
null
,
null
,
null
,
null
)
var
param
=
HashMap
<
String
,
String
?>()
param
[
"order_status"
]
=
"
4
"
param
[
"order_status"
]
=
"
5
"
param
[
"business_from"
]
=
"2"
vm
.
requestUserOrder
(
param
)
}
...
...
Components/BUserOrder/src/main/res/drawable-xxhdpi/glide_pic.jpeg
0 → 100644
View file @
bc8ad372
49.4 KB
Components/BUserOrder/src/main/res/layout/border_recycle_order_item.xml
View file @
bc8ad372
...
...
@@ -72,14 +72,14 @@
android:layout_width=
"70dp"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<
com.yidian.shenghuoquan.buserorder.view.Round
ImageView
<
androidx.appcompat.widget.AppCompat
ImageView
android:id=
"@+id/round_image1"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp60"
android:scaleType=
"
centerInside
"
android:scaleType=
"
fitCenter
"
app:radius=
"@dimen/dp12"
android:src=
"@drawable/icon_default_order_pic"
>
</
com.yidian.shenghuoquan.buserorder.view.Round
ImageView>
</
androidx.appcompat.widget.AppCompat
ImageView>
<TextView
android:id=
"@+id/tv_goog1_name"
android:layout_width=
"wrap_content"
...
...
@@ -100,14 +100,13 @@
android:orientation=
"vertical"
android:layout_toRightOf=
"@+id/ll_order_image1"
android:layout_marginStart=
"@dimen/dp8"
>
<
com.yidian.shenghuoquan.buserorder.view.Round
ImageView
<
androidx.appcompat.widget.AppCompat
ImageView
android:id=
"@+id/round_image2"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp60"
android:scaleType=
"centerCrop"
app:radius=
"@dimen/dp12"
android:src=
"@drawable/icon_default_order_pic"
>
</
com.yidian.shenghuoquan.buserorder.view.Round
ImageView>
</
androidx.appcompat.widget.AppCompat
ImageView>
<TextView
android:id=
"@+id/tv_goog2_name"
...
...
@@ -129,14 +128,13 @@
android:orientation=
"vertical"
android:layout_marginLeft=
"@dimen/dp8"
android:layout_toRightOf=
"@+id/ll_order_image2"
>
<
com.yidian.shenghuoquan.buserorder.view.Round
ImageView
<
androidx.appcompat.widget.AppCompat
ImageView
android:id=
"@+id/round_image3"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:scaleType=
"centerCrop"
app:radius=
"@dimen/dp12"
android:src=
"@drawable/icon_default_order_pic"
>
</
com.yidian.shenghuoquan.buserorder.view.Round
ImageView>
</
androidx.appcompat.widget.AppCompat
ImageView>
<TextView
android:id=
"@+id/tv_good3_name"
android:layout_width=
"wrap_content"
...
...
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