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
6e2b5c44
Commit
6e2b5c44
authored
Aug 31, 2021
by
chengkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发送优惠券选择消息
parent
b1fc8d0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
VoncherAdapter.kt
.../com/yidian/shenghuoquan/border/adapter/VoncherAdapter.kt
+10
-0
Utils.kt
...c/main/java/com/yidian/shenghuoquan/border/utils/Utils.kt
+4
-0
icon_default_order_pic.webp
.../src/main/res/drawable-xxhdpi/icon_default_order_pic.webp
+0
-0
No files found.
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/border/adapter/VoncherAdapter.kt
View file @
6e2b5c44
package
com.yidian.shenghuoquan.border.adapter
import
android.app.Activity
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.RelativeLayout
import
android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
com.yidian.bcommon.constant.XEventConfig.Companion.CONFIRM_ORDER_CHOOSE_COUPON_SUCCESS
import
com.yidian.shenghuoquan.border.R
import
com.yidian.shenghuoquan.border.dto.CouponDto
import
com.yidian.xarc.xevent.XBaseEvent
import
com.yidian.xarc.xevent.XEventManager
class
VoncherAdapter
(
var
context
:
Context
,
var
voncherList
:
List
<
CouponDto
>)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
...
...
@@ -34,5 +39,10 @@ class VoncherAdapter(var context: Context, var voncherList:List<CouponDto>) : Re
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_start_end_time
).
text
=
"${data.startTime} ${data.endTime}"
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_voncher_type
).
text
=
"${data.scopeUse}"
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_voncher_desc
).
text
=
data
.
desc
holder
.
itemView
.
findViewById
<
RelativeLayout
>(
R
.
id
.
rl_use_voncher
).
setOnClickListener
{
XEventManager
.
post
(
XBaseEvent
(
CONFIRM_ORDER_CHOOSE_COUPON_SUCCESS
,
position
))
var
ac
=
context
as
Activity
ac
.
finish
()
}
}
}
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/border/utils/Utils.kt
0 → 100644
View file @
6e2b5c44
package
com.yidian.shenghuoquan.border.utils
class
Utils
{
}
Components/BUserOrder/src/main/res/drawable-xxhdpi/icon_default_order_pic.webp
0 → 100644
View file @
6e2b5c44
File added
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