Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
f51cbd16
Commit
f51cbd16
authored
Feb 22, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新会员页样式
parent
003e5176
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
38 deletions
+38
-38
build.gradle
video/app/build.gradle
+2
-2
VipAdapter.kt
.../main/java/com/duben/xixiplaylet/ui/adapter/VipAdapter.kt
+36
-36
No files found.
video/app/build.gradle
View file @
f51cbd16
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.xixiplaylet"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
2
3
versionName
"2.0.
2
"
versionCode
2
4
versionName
"2.0.
3
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
video/app/src/main/java/com/duben/xixiplaylet/ui/adapter/VipAdapter.kt
View file @
f51cbd16
...
...
@@ -69,19 +69,41 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
}
try
{
if
(!
TextUtils
.
isEmpty
(
vipBean
.
topTitle
)){
val
topArray
=
vipBean
.
topTitle
.
split
(
","
)
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
.
append
(
topArray
[
0
])
.
append
(
topArray
[
1
])
.
setFontSize
(
BubbleUtils
.
sp2px
(
28
))
.
append
(
topArray
[
2
])
.
create
()
holder
.
tvVipItemMoney
.
text
=
topArray
[
3
]
holder
.
tvVipItemTitle
.
text
=
topArray
[
4
]
}
else
{
// try {
// if(!TextUtils.isEmpty(vipBean.topTitle)){
//
// val topArray= vipBean.topTitle.split(",")
// holder.tvVipItemCurMoney.text = SpanUtils()
// .append(topArray[0])
// .append(topArray[1])
// .setFontSize(BubbleUtils.sp2px(28))
// .append(topArray[2])
// .create()
// holder.tvVipItemMoney.text = topArray[3]
// holder.tvVipItemTitle.text = topArray[4]
// }else{
// holder.tvVipItemTitle.text = vipBean.title
// if (vipBean.price < 1) {
// holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
// } else {
// holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
//// holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}"
// }
// if (vipBean.oldPrice > 0) {
// holder.tvVipItemMoney.visibility = View.VISIBLE
// holder.tvVipItemMoney.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中间横线(删除线)
// if (vipBean.oldPrice < 1) {
// holder.tvVipItemMoney.text = "原价:${vipBean.oldPrice}"
// } else {
// holder.tvVipItemMoney.text = "原价:${String.format("%.0f", vipBean.oldPrice)}"
// }
// } else {
// holder.tvVipItemMoney.visibility = View.INVISIBLE
// }
//
// }
// }catch (e:Exception){
// e.printStackTrace()
holder
.
tvVipItemTitle
.
text
=
vipBean
.
title
if
(
vipBean
.
price
<
1
)
{
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
...
...
@@ -100,29 +122,7 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
}
else
{
holder
.
tvVipItemMoney
.
visibility
=
View
.
INVISIBLE
}
}
}
catch
(
e
:
Exception
){
e
.
printStackTrace
()
holder
.
tvVipItemTitle
.
text
=
vipBean
.
title
if
(
vipBean
.
price
<
1
)
{
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
}
else
{
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
// holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}"
}
if
(
vipBean
.
oldPrice
>
0
)
{
holder
.
tvVipItemMoney
.
visibility
=
View
.
VISIBLE
holder
.
tvVipItemMoney
.
getPaint
().
setFlags
(
Paint
.
STRIKE_THRU_TEXT_FLAG
)
//中间横线(删除线)
if
(
vipBean
.
oldPrice
<
1
)
{
holder
.
tvVipItemMoney
.
text
=
"原价:${vipBean.oldPrice}"
}
else
{
holder
.
tvVipItemMoney
.
text
=
"原价:${String.format("
%.
0f
", vipBean.oldPrice)}"
}
}
else
{
holder
.
tvVipItemMoney
.
visibility
=
View
.
INVISIBLE
}
}
// }
...
...
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