Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_freeworld
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
android
android_freeworld
Commits
f3ad3ad3
Commit
f3ad3ad3
authored
Jul 21, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加产品推荐
parent
8f58055b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
23 deletions
+38
-23
GridPaymentAdapter.kt
.../main/java/com/mints/street/adapter/GridPaymentAdapter.kt
+3
-1
item_grid_payment_adpater.xml
app/src/main/res/layout/item_grid_payment_adpater.xml
+35
-22
ic_vip_hot.png
app/src/main/res/mipmap-xhdpi/ic_vip_hot.png
+0
-0
No files found.
app/src/main/java/com/mints/street/adapter/GridPaymentAdapter.kt
View file @
f3ad3ad3
...
@@ -2,6 +2,7 @@ package com.mints.street.adapter
...
@@ -2,6 +2,7 @@ package com.mints.street.adapter
import
android.content.Context
import
android.content.Context
import
android.graphics.Paint
import
android.graphics.Paint
import
android.view.View
import
com.alibaba.android.vlayout.layout.GridLayoutHelper
import
com.alibaba.android.vlayout.layout.GridLayoutHelper
import
com.alibaba.android.vlayout.layout.LinearLayoutHelper
import
com.alibaba.android.vlayout.layout.LinearLayoutHelper
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
...
@@ -53,6 +54,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
...
@@ -53,6 +54,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
holder
.
binding
.
tvDays
.
text
=
"${databean.days}天"
holder
.
binding
.
tvDays
.
text
=
"${databean.days}天"
holder
.
binding
.
tvOldprice
.
text
=
"原价¥${databean.oldPrice}"
holder
.
binding
.
tvOldprice
.
text
=
"原价¥${databean.oldPrice}"
holder
.
binding
.
tvPrice
.
text
=
"¥${databean.price}"
holder
.
binding
.
tvPrice
.
text
=
"¥${databean.price}"
holder
.
binding
.
ivHot
.
visibility
=
if
(
databean
.
activityType
==
0
)
View
.
GONE
else
View
.
VISIBLE
}
}
}
}
...
@@ -69,7 +71,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
...
@@ -69,7 +71,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_grid_payment_adpater
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_grid_payment_adpater
fun
getPosition
()
=
mposition
fun
getPosition
()
=
mposition
}
}
app/src/main/res/layout/item_grid_payment_adpater.xml
View file @
f3ad3ad3
...
@@ -8,8 +8,12 @@
...
@@ -8,8 +8,12 @@
type=
"com.mints.street.adapter.GridPaymentAdapter"
/>
type=
"com.mints.street.adapter.GridPaymentAdapter"
/>
</data>
</data>
<
Linear
Layout
<
Frame
Layout
android:id=
"@+id/bg"
android:id=
"@+id/bg"
android:layout_width=
"80dp"
android:layout_height=
"130dp"
>
<LinearLayout
android:layout_width=
"80dp"
android:layout_width=
"80dp"
android:layout_height=
"130dp"
android:layout_height=
"130dp"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -37,4 +41,13 @@
...
@@ -37,4 +41,13 @@
android:textColor=
"#25000000"
android:textColor=
"#25000000"
android:textSize=
"10dp"
/>
android:textSize=
"10dp"
/>
</LinearLayout>
</LinearLayout>
<ImageView
android:id=
"@+id/iv_hot"
android:layout_gravity=
"right"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
android:src=
"@mipmap/ic_vip_hot"
></ImageView>
</FrameLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/ic_vip_hot.png
0 → 100644
View file @
f3ad3ad3
4.73 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