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
903f90e5
Commit
903f90e5
authored
Sep 20, 2023
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
3e3c9a58
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
26 deletions
+31
-26
build.gradle
video/app/build.gradle
+2
-2
VipActivity.kt
.../java/com/duben/duoduoplaylet/ui/activitys/VipActivity.kt
+3
-2
VipAdapter.kt
...ain/java/com/duben/duoduoplaylet/ui/adapter/VipAdapter.kt
+0
-4
PayYesDialog.kt
...n/java/com/duben/duoduoplaylet/ui/widgets/PayYesDialog.kt
+0
-10
VipPayCancelDialog.kt
.../com/duben/duoduoplaylet/ui/widgets/VipPayCancelDialog.kt
+3
-1
dialog_vip_pay_cancel.xml
video/app/src/main/res/layout/dialog_vip_pay_cancel.xml
+23
-7
bg_vip_cancel.png
video/app/src/main/res/mipmap-xhdpi/bg_vip_cancel.png
+0
-0
No files found.
video/app/build.gradle
View file @
903f90e5
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.duoduoplaylet"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
versionName
"1.0.
0
"
versionCode
2
versionName
"1.0.
1
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
video/app/src/main/java/com/duben/duoduoplaylet/ui/activitys/VipActivity.kt
View file @
903f90e5
...
...
@@ -695,12 +695,13 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
private
fun
showPayCancelDialog
()
{
VipPayCancelDialog
(
this
,
object
:
DialogListener
()
{
val
vipBean
=
vipList
!!
[
0
]
VipPayCancelDialog
(
this
,
vipBean
.
price
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
dialog
?.
dismiss
()
val
vipBean
=
vipList
!!
[
0
]
vipPresenter
.
getVipPayParams
(
"ALIPAY"
,
vipBean
.
pid
,
isAliPayInstalled
()
...
...
video/app/src/main/java/com/duben/duoduoplaylet/ui/adapter/VipAdapter.kt
View file @
903f90e5
...
...
@@ -63,11 +63,7 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
holder
.
tvVipItemLable
.
setBackgroundResource
(
R
.
mipmap
.
ic_vip_lable_wx
)
}
if
(
vipBean
.
price
<
1
)
{
holder
.
tvVipItemCurMoney
.
text
=
"¥${vipBean.price}"
}
else
{
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
)
//中间横线(删除线)
...
...
video/app/src/main/java/com/duben/duoduoplaylet/ui/widgets/PayYesDialog.kt
View file @
903f90e5
...
...
@@ -55,7 +55,6 @@ class PayYesDialog(
iv_dialog_vip_quit
.
setOnClickListener
(
listener
)
tv_dialog_vip_next
.
setOnClickListener
(
listener
)
if
(
vipBean
.
trial
==
0
)
{
//0-没签约 无0.01
tv_dialog_vip_count
.
text
=
SpanUtils
()
.
append
(
""
+
vipBean
.
price
)
...
...
@@ -64,14 +63,5 @@ class PayYesDialog(
.
setFontSize
(
16
,
true
)
.
create
()
iv_dialog_vip_top
.
setImageResource
(
R
.
mipmap
.
ic_vip_pay_top2
)
}
else
{
tv_dialog_vip_count
.
text
=
SpanUtils
()
.
append
(
"0.01"
)
.
setFontSize
(
30
,
true
)
.
append
(
" 元"
)
.
setFontSize
(
16
,
true
)
.
create
()
iv_dialog_vip_top
.
setImageResource
(
R
.
mipmap
.
ic_vip_pay_top1
)
}
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/duoduoplaylet/ui/widgets/VipPayCancelDialog.kt
View file @
903f90e5
...
...
@@ -9,9 +9,11 @@ import android.view.WindowManager
import
com.duben.duoduoplaylet.R
import
com.duben.duoduoplaylet.common.AppConfig
import
com.duben.duoduoplaylet.utils.MilliCountDownTimer
import
kotlinx.android.synthetic.main.dialog_vip_pay_cancel.*
class
VipPayCancelDialog
(
val
activity
:
Activity
,
val
cash
:
Double
,
private
val
listener
:
DialogListener
)
:
Dialog
(
activity
,
R
.
style
.
dialog
)
{
...
...
@@ -39,7 +41,7 @@ class VipPayCancelDialog(
findViewById
<
View
>(
R
.
id
.
iv_back
).
setOnClickListener
{
dismiss
()
}
tv_cancel_cash
.
text
=
"${cash}元"
listener
.
setDialog
(
this
)
findViewById
<
View
>(
R
.
id
.
btn
).
setOnClickListener
(
listener
)
...
...
video/app/src/main/res/layout/dialog_vip_pay_cancel.xml
View file @
903f90e5
...
...
@@ -19,16 +19,32 @@
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/imageView2"
android:layout_width=
"match_parent"
android:layout_height=
"360dp"
android:layout_marginTop=
"30dp"
android:src=
"@mipmap/bg_vip_cancel"
<FrameLayout
android:layout_width=
"wrap_content"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/imageView2"
android:layout_width=
"match_parent"
android:layout_height=
"360dp"
android:layout_marginTop=
"30dp"
android:src=
"@mipmap/bg_vip_cancel"
/>
<TextView
android:id=
"@+id/tv_cancel_cash"
android:layout_width=
"wrap_content"
android:textSize=
"30dp"
android:text=
"0.01元"
android:textStyle=
"bold"
android:layout_marginLeft=
"110dp"
android:layout_marginTop=
"193dp"
android:textColor=
"@color/tv_message_recente_money"
android:layout_height=
"wrap_content"
></TextView>
</FrameLayout>
<Button
android:id=
"@+id/btn"
...
...
video/app/src/main/res/mipmap-xhdpi/bg_vip_cancel.png
View replaced file @
3e3c9a58
View file @
903f90e5
169 KB
|
W:
|
H:
165 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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