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
847704bc
Commit
847704bc
authored
Nov 29, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
8797e99a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
21 deletions
+38
-21
build.gradle
video/app/build.gradle
+2
-2
VipBean.java
...c/main/java/com/duben/loveplayletu/mvp/model/VipBean.java
+10
-1
VipActivity.kt
...n/java/com/duben/loveplayletu/ui/activitys/VipActivity.kt
+15
-7
VipAdapter.kt
...main/java/com/duben/loveplayletu/ui/adapter/VipAdapter.kt
+7
-7
activity_new_vip.xml
video/app/src/main/res/layout/activity_new_vip.xml
+1
-1
item_rv_vip.xml
video/app/src/main/res/layout/item_rv_vip.xml
+3
-3
No files found.
video/app/build.gradle
View file @
847704bc
...
@@ -10,8 +10,8 @@ android {
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.loveplayletu"
applicationId
"com.duben.loveplayletu"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
72
6
versionCode
72
7
versionName
"7.2.
6
"
versionName
"7.2.
7
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
...
video/app/src/main/java/com/duben/loveplayletu/mvp/model/VipBean.java
View file @
847704bc
...
@@ -17,12 +17,13 @@ public class VipBean implements Serializable {
...
@@ -17,12 +17,13 @@ public class VipBean implements Serializable {
return
list
;
return
list
;
}
}
public
class
ListBean
implements
Serializable
{
public
class
ListBean
implements
Serializable
{
private
boolean
weixin
;
private
boolean
weixin
;
private
boolean
alipay
;
private
boolean
alipay
;
private
boolean
showCycTips
;
// 判断是否提示
private
boolean
showCycTips
;
// 判断是否提示
private
double
firstPayPrice
;
private
double
firstPayPrice
;
private
double
firstPayPriceAfterBack
;
private
double
oldPrice
;
private
double
oldPrice
;
private
int
days
;
private
int
days
;
private
int
trial
;
//是否签约 0-没签约 1-签约
private
int
trial
;
//是否签约 0-没签约 1-签约
...
@@ -58,6 +59,14 @@ public class VipBean implements Serializable {
...
@@ -58,6 +59,14 @@ public class VipBean implements Serializable {
return
firstPayPrice
;
return
firstPayPrice
;
}
}
public
double
getFirstPayPriceAfterBack
()
{
return
firstPayPriceAfterBack
;
}
public
void
setFirstPayPriceAfterBack
(
double
firstPayPriceAfterBack
)
{
this
.
firstPayPriceAfterBack
=
firstPayPriceAfterBack
;
}
public
double
getOldPrice
()
{
public
double
getOldPrice
()
{
return
oldPrice
;
return
oldPrice
;
}
}
...
...
video/app/src/main/java/com/duben/loveplayletu/ui/activitys/VipActivity.kt
View file @
847704bc
...
@@ -225,13 +225,21 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
...
@@ -225,13 +225,21 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if
(!
TextUtils
.
isEmpty
(
bean
.
buttonText
))
{
if
(!
TextUtils
.
isEmpty
(
bean
.
buttonText
))
{
if
(
bean
.
isShowCycTips
)
{
if
(
bean
.
isShowCycTips
)
{
tvVipPay
.
text
=
SpanUtils
()
if
(
bean
.
remarks
.
isEmpty
())
{
.
append
(
bean
.
buttonText
+
"\n"
)
tvVipPay
.
text
=
SpanUtils
()
.
setFontSize
(
20
,
true
)
.
append
(
bean
.
buttonText
)
.
append
(
bean
.
remarks
)
.
setFontSize
(
20
,
true
)
.
setFontSize
(
10
,
true
)
.
create
()
.
setForegroundColor
(
Color
.
parseColor
(
"#A24240"
))
}
else
{
.
create
()
tvVipPay
.
text
=
SpanUtils
()
.
append
(
bean
.
buttonText
+
"\n"
)
.
setFontSize
(
20
,
true
)
.
append
(
bean
.
remarks
)
.
setFontSize
(
10
,
true
)
.
setForegroundColor
(
Color
.
parseColor
(
"#A24240"
))
.
create
()
}
tvVipAgreement
.
text
=
"点击购买即表示您同意《自动续费协议》"
tvVipAgreement
.
text
=
"点击购买即表示您同意《自动续费协议》"
}
else
{
}
else
{
tvVipPay
.
text
=
bean
.
buttonText
tvVipPay
.
text
=
bean
.
buttonText
...
...
video/app/src/main/java/com/duben/loveplayletu/ui/adapter/VipAdapter.kt
View file @
847704bc
...
@@ -61,25 +61,25 @@ class VipAdapter(private val vipList: MutableList<VipBean.ListBean>) :
...
@@ -61,25 +61,25 @@ class VipAdapter(private val vipList: MutableList<VipBean.ListBean>) :
holder
.
tvVipItemOldMoney
.
text
=
SpanUtils
()
holder
.
tvVipItemOldMoney
.
text
=
SpanUtils
()
.
append
(
"原价 "
)
.
append
(
"原价 "
)
.
setFontSize
(
BubbleUtils
.
sp2px
(
1
4
))
.
setFontSize
(
BubbleUtils
.
sp2px
(
1
0
))
.
setStrikethrough
()
.
setStrikethrough
()
.
append
(
""
+
vipBean
.
oldPrice
)
.
append
(
""
+
vipBean
.
oldPrice
)
.
setFontSize
(
BubbleUtils
.
sp2px
(
1
6
))
.
setFontSize
(
BubbleUtils
.
sp2px
(
1
2
))
.
setBold
()
.
setBold
()
.
setStrikethrough
()
.
setStrikethrough
()
.
create
()
.
create
()
if
(
vipBean
.
price
==
0.0
)
{
if
(
vipBean
.
firstPayPriceAfterBack
==
0.0
)
{
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
.
append
(
"¥"
)
.
append
(
"¥"
)
.
append
(
"0
.01
"
)
.
append
(
"0"
)
.
setFontSize
(
BubbleUtils
.
sp2px
(
3
0
))
.
setFontSize
(
BubbleUtils
.
sp2px
(
3
6
))
.
create
()
.
create
()
}
else
{
}
else
{
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
holder
.
tvVipItemCurMoney
.
text
=
SpanUtils
()
.
append
(
"¥"
)
.
append
(
"¥"
)
.
append
(
vipBean
.
price
.
toString
())
.
append
(
vipBean
.
firstPayPriceAfterBack
.
toString
())
.
setFontSize
(
BubbleUtils
.
sp2px
(
3
0
))
.
setFontSize
(
BubbleUtils
.
sp2px
(
3
6
))
.
create
()
.
create
()
}
}
...
...
video/app/src/main/res/layout/activity_new_vip.xml
View file @
847704bc
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvVip"
android:id=
"@+id/rvVip"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"1
5
0dp"
android:layout_height=
"1
7
0dp"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:background=
"@null"
android:background=
"@null"
android:overScrollMode=
"never"
/>
android:overScrollMode=
"never"
/>
...
...
video/app/src/main/res/layout/item_rv_vip.xml
View file @
847704bc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"1
3
8dp"
android:layout_height=
"1
5
8dp"
android:layout_marginLeft=
"5dp"
android:layout_marginLeft=
"5dp"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"5dp"
android:layout_marginRight=
"5dp"
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<FrameLayout
<FrameLayout
android:id=
"@+id/rlVipItemRoot"
android:id=
"@+id/rlVipItemRoot"
android:layout_width=
"130dp"
android:layout_width=
"130dp"
android:layout_height=
"1
3
0dp"
android:layout_height=
"1
5
0dp"
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"8dp"
android:background=
"@drawable/shape_vip_adapter_none"
android:background=
"@drawable/shape_vip_adapter_none"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"#efbc6a"
android:textColor=
"#efbc6a"
android:textSize=
"1
4
sp"
android:textSize=
"1
0
sp"
tools:text=
"$78"
/>
tools:text=
"$78"
/>
</LinearLayout>
</LinearLayout>
...
...
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