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
21942a83
Commit
21942a83
authored
Sep 07, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
4c8f9b89
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
74 deletions
+54
-74
PayYesDialog.kt
.../main/java/com/mints/helivideo/ui/widgets/PayYesDialog.kt
+20
-20
dialog_payyes.xml
video/app/src/main/res/layout/dialog_payyes.xml
+33
-54
bg_pay_yes.png
video/app/src/main/res/mipmap-xhdpi/bg_pay_yes.png
+0
-0
ic_vip_pay_btn.png
video/app/src/main/res/mipmap-xhdpi/ic_vip_pay_btn.png
+0
-0
ic_vip_pay_top1.png
video/app/src/main/res/mipmap-xhdpi/ic_vip_pay_top1.png
+0
-0
ic_vip_pay_top2.png
video/app/src/main/res/mipmap-xhdpi/ic_vip_pay_top2.png
+0
-0
colors.xml
video/app/src/main/res/values/colors.xml
+1
-0
No files found.
video/app/src/main/java/com/mints/helivideo/ui/widgets/PayYesDialog.kt
View file @
21942a83
...
...
@@ -13,6 +13,7 @@ import android.widget.TextView
import
com.mints.helivideo.R
import
com.mints.helivideo.common.AppConfig
import
com.mints.helivideo.mvp.model.VipBean
import
com.mints.helivideo.utils.SpanUtils
class
PayYesDialog
(
private
val
context
:
Context
,
...
...
@@ -22,12 +23,10 @@ class PayYesDialog(
context
,
R
.
style
.
dialog
)
{
private
val
lp
:
WindowManager
.
LayoutParams
private
val
fl_dialog_vip_money_root
:
FrameLayout
private
val
tv_dialog_vip_next
:
TextView
private
val
tv_dialog_vip_money_left
:
TextView
private
val
tv_dialog_vip_money_right
:
TextView
private
val
tv_dialog_vip_money_center
:
TextView
private
val
tv_dialog_vip_count
:
TextView
private
val
iv_dialog_vip_quit
:
ImageView
private
val
iv_dialog_vip_top
:
ImageView
private
val
rl_dialog_vip_bg
:
RelativeLayout
init
{
...
...
@@ -43,35 +42,36 @@ class PayYesDialog(
setCancelable
(
false
)
setCanceledOnTouchOutside
(
false
)
setOnKeyListener
{
dialogInterface
,
i
,
keyEvent
->
if
(
i
==
KeyEvent
.
KEYCODE_BACK
)
{
true
}
else
false
i
==
KeyEvent
.
KEYCODE_BACK
}
// 查找View
fl_dialog_vip_money_root
=
findViewById
<
View
>(
R
.
id
.
fl_dialog_vip_money_root
)
as
FrameLayout
iv_dialog_vip_quit
=
findViewById
<
View
>(
R
.
id
.
iv_dialog_vip_quit
)
as
ImageView
iv_dialog_vip_top
=
findViewById
<
View
>(
R
.
id
.
iv_dialog_vip_top
)
as
ImageView
tv_dialog_vip_next
=
findViewById
<
View
>(
R
.
id
.
tv_dialog_vip_next
)
as
TextView
tv_dialog_vip_money_left
=
findViewById
<
View
>(
R
.
id
.
tv_dialog_vip_money_left
)
as
TextView
tv_dialog_vip_money_right
=
findViewById
<
View
>(
R
.
id
.
tv_dialog_vip_money_right
)
as
TextView
tv_dialog_vip_money_center
=
findViewById
<
View
>(
R
.
id
.
tv_dialog_vip_money_center
)
as
TextView
tv_dialog_vip_count
=
findViewById
<
View
>(
R
.
id
.
tv_dialog_vip_count
)
as
TextView
rl_dialog_vip_bg
=
findViewById
<
View
>(
R
.
id
.
rl_dialog_vip_bg
)
as
RelativeLayout
iv_dialog_vip_quit
.
setOnClickListener
(
listener
)
tv_dialog_vip_next
.
setOnClickListener
(
listener
)
if
(
vipBean
.
trial
==
0
)
{
//0-没签约 无0.01
fl_dialog_vip_money_root
.
visibility
=
View
.
VISIBLE
tv_dialog_vip_money_left
.
text
=
"¥${vipBean.oldPrice}"
tv_dialog_vip_money_right
.
text
=
"¥${vipBean.oldPrice}"
tv_dialog_vip_money_center
.
text
=
"¥${vipBean.price}"
tv_dialog_vip_next
.
text
=
"立即开通"
rl_dialog_vip_bg
.
setBackgroundResource
(
R
.
mipmap
.
bg_vip_dialog_one
)
tv_dialog_vip_count
.
text
=
SpanUtils
()
.
append
(
""
+
vipBean
.
price
)
.
setFontSize
(
30
,
true
)
.
append
(
" 元"
)
.
setFontSize
(
16
,
true
)
.
create
()
iv_dialog_vip_top
.
setImageResource
(
R
.
mipmap
.
ic_vip_pay_top2
)
}
else
{
fl_dialog_vip_money_root
.
visibility
=
View
.
GONE
tv_dialog_vip_next
.
text
=
"${0.01}元试用"
rl_dialog_vip_bg
.
setBackgroundResource
(
R
.
mipmap
.
bg_vip_dialog_zero
)
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/res/layout/dialog_payyes.xml
View file @
21942a83
<?xml version="1.0" encoding="utf-8"?>
<
Relativ
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Fram
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:id=
"@+id/rl_dialog_vip_bg"
android:layout_width=
"340dp"
android:layout_height=
"550dp"
android:layout_centerInParent=
"true"
android:background=
"@mipmap/bg_vip_dialog_zero"
android:layout_width=
"match_parent"
android:layout_height=
"420dp"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"36dp"
android:layout_marginTop=
"-20dp"
android:layout_marginEnd=
"36dp"
android:background=
"@mipmap/bg_pay_yes"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_dialog_vip_top"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:src=
"@mipmap/ic_vip_pay_top1"
/>
<ImageView
android:id=
"@+id/iv_dialog_vip_quit"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_alignParentRight=
"true"
android:src=
"@mipmap/ic_quit_yuan"
></ImageView>
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"124dp"
android:layout_marginEnd=
"15dp"
android:layout_marginRight=
"20dp"
android:src=
"@mipmap/ic_vip_back"
/>
<TextView
android:id=
"@+id/tv_dialog_vip_
nex
t"
android:id=
"@+id/tv_dialog_vip_
coun
t"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginBottom=
"70dp"
android:background=
"@mipmap/bg_vip_dialog_btn"
android:gravity=
"center"
android:text=
"立即开通"
android:textColor=
"#6B3D1A"
android:textSize=
"20sp"
></TextView>
android:layout_marginBottom=
"136dp"
android:textColor=
"@color/color_FFF0D4"
/>
<
FrameLayout
android:id=
"@+id/
fl_dialog_vip_money_roo
t"
android:layout_width=
"
match_par
ent"
<
TextView
android:id=
"@+id/
tv_dialog_vip_nex
t"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
>
<TextView
android:id=
"@+id/tv_dialog_vip_money_left"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"45dp"
android:layout_marginTop=
"200dp"
android:text=
"¥123"
android:textColor=
"@color/red"
android:textSize=
"22sp"
></TextView>
<TextView
android:id=
"@+id/tv_dialog_vip_money_right"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"200dp"
android:layout_marginRight=
"45dp"
android:text=
"¥123"
android:textColor=
"@color/red"
android:textSize=
"22sp"
></TextView>
<TextView
android:id=
"@+id/tv_dialog_vip_money_center"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"260dp"
android:text=
"¥123"
android:textColor=
"@color/red"
android:textSize=
"22sp"
></TextView>
</FrameLayout>
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginBottom=
"30dp"
android:background=
"@mipmap/ic_vip_pay_btn"
/>
</RelativeLayout>
</
Relativ
eLayout>
</
Fram
eLayout>
video/app/src/main/res/mipmap-xhdpi/bg_pay_yes.png
0 → 100644
View file @
21942a83
264 KB
video/app/src/main/res/mipmap-xhdpi/ic_vip_pay_btn.png
0 → 100644
View file @
21942a83
25.5 KB
video/app/src/main/res/mipmap-xhdpi/ic_vip_pay_top1.png
0 → 100644
View file @
21942a83
47.2 KB
video/app/src/main/res/mipmap-xhdpi/ic_vip_pay_top2.png
0 → 100644
View file @
21942a83
40.7 KB
video/app/src/main/res/values/colors.xml
View file @
21942a83
...
...
@@ -32,5 +32,6 @@
<color
name=
"color_FD7E0E"
>
#FD7E0E
</color>
<color
name=
"color_815136"
>
#815136
</color>
<color
name=
"color_FFF0D4"
>
#FFF0D4
</color>
</resources>
\ No newline at end of file
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