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
Hide 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 {
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.xixiplaylet"
applicationId
"com.duben.xixiplaylet"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
2
3
versionCode
2
4
versionName
"2.0.
2
"
versionName
"2.0.
3
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
...
video/app/src/main/java/com/duben/xixiplaylet/ui/adapter/VipAdapter.kt
View file @
f51cbd16
...
@@ -69,41 +69,41 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
...
@@ -69,41 +69,41 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
}
}
try
{
//
try {
if
(!
TextUtils
.
isEmpty
(
vipBean
.
topTitle
)){
//
if(!TextUtils.isEmpty(vipBean.topTitle)){
//
val
topArray
=
vipBean
.
topTitle
.
split
(
","
)
//
val topArray= vipBean.topTitle.split(",")
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
//
holder.tvVipItemCurMoney.text = SpanUtils()
.
append
(
topArray
[
0
])
//
.append(topArray[0])
.
append
(
topArray
[
1
])
//
.append(topArray[1])
.
setFontSize
(
BubbleUtils
.
sp2px
(
28
))
//
.setFontSize(BubbleUtils.sp2px(28))
.
append
(
topArray
[
2
])
//
.append(topArray[2])
.
create
()
//
.create()
holder
.
tvVipItemMoney
.
text
=
topArray
[
3
]
//
holder.tvVipItemMoney.text = topArray[3]
holder
.
tvVipItemTitle
.
text
=
topArray
[
4
]
//
holder.tvVipItemTitle.text = topArray[4]
}
else
{
//
}else{
holder
.
tvVipItemTitle
.
text
=
vipBean
.
title
//
holder.tvVipItemTitle.text = vipBean.title
if
(
vipBean
.
price
<
1
)
{
//
if (vipBean.price < 1) {
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
//
holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
}
else
{
//
} else {
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
//
holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
// holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}"
//
//
holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}"
}
//
}
if
(
vipBean
.
oldPrice
>
0
)
{
//
if (vipBean.oldPrice > 0) {
holder
.
tvVipItemMoney
.
visibility
=
View
.
VISIBLE
//
holder.tvVipItemMoney.visibility = View.VISIBLE
holder
.
tvVipItemMoney
.
getPaint
().
setFlags
(
Paint
.
STRIKE_THRU_TEXT_FLAG
)
//中间横线(删除线)
//
holder.tvVipItemMoney.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中间横线(删除线)
if
(
vipBean
.
oldPrice
<
1
)
{
//
if (vipBean.oldPrice < 1) {
holder
.
tvVipItemMoney
.
text
=
"原价:${vipBean.oldPrice}"
//
holder.tvVipItemMoney.text = "原价:${vipBean.oldPrice}"
}
else
{
//
} else {
holder
.
tvVipItemMoney
.
text
=
"原价:${String.format("
%.
0f
", vipBean.oldPrice)}"
//
holder.tvVipItemMoney.text = "原价:${String.format("%.0f", vipBean.oldPrice)}"
}
//
}
}
else
{
//
} else {
holder
.
tvVipItemMoney
.
visibility
=
View
.
INVISIBLE
//
holder.tvVipItemMoney.visibility = View.INVISIBLE
}
//
}
//
}
//
}
}
catch
(
e
:
Exception
){
//
}catch (e:Exception){
e
.
printStackTrace
()
//
e.printStackTrace()
holder
.
tvVipItemTitle
.
text
=
vipBean
.
title
holder
.
tvVipItemTitle
.
text
=
vipBean
.
title
if
(
vipBean
.
price
<
1
)
{
if
(
vipBean
.
price
<
1
)
{
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
...
@@ -122,7 +122,7 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
...
@@ -122,7 +122,7 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
}
else
{
}
else
{
holder
.
tvVipItemMoney
.
visibility
=
View
.
INVISIBLE
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