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
7bb023f2
Commit
7bb023f2
authored
Nov 27, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加全额返弹窗
parent
e8663f2d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
1 deletion
+151
-1
VipActivity.kt
...n/java/com/duben/loveplayletu/ui/activitys/VipActivity.kt
+7
-0
VipBackDialog.kt
...n/java/com/duben/loveplayletu/ui/widgets/VipBackDialog.kt
+53
-0
shape_vip_back.xml
video/app/src/main/res/drawable/shape_vip_back.xml
+11
-0
activity_new_vip.xml
video/app/src/main/res/layout/activity_new_vip.xml
+9
-1
dialog_vip_back.xml
video/app/src/main/res/layout/dialog_vip_back.xml
+71
-0
No files found.
video/app/src/main/java/com/duben/loveplayletu/ui/activitys/VipActivity.kt
View file @
7bb023f2
...
...
@@ -210,6 +210,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if
(!
TextUtils
.
isEmpty
(
bean
.
remarks
))
{
tv_vip_hint
.
text
=
bean
.
remarks
tv_vip_hint
.
visibility
=
View
.
VISIBLE
tv_vip_back
.
visibility
=
View
.
VISIBLE
if
(
bean
.
isShowCycTips
)
{
tv_vip_hint
.
setTextColor
(
Color
.
parseColor
(
"#FFAC5E"
))
tv_vip_hint
.
textSize
=
12f
...
...
@@ -219,6 +220,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
}
else
{
tv_vip_hint
.
visibility
=
View
.
INVISIBLE
tv_vip_back
.
visibility
=
View
.
INVISIBLE
}
if
(!
TextUtils
.
isEmpty
(
bean
.
buttonText
))
{
...
...
@@ -417,6 +419,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
R
.
id
.
tv_vip_back
->
{
VipBackDialog
(
this
).
show
()
}
}
}
...
...
@@ -456,6 +461,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
ll_vip_alipay
.
setOnClickListener
(
this
)
ll_vip_wx
.
setOnClickListener
(
this
)
cbVipAgreement
.
setOnCheckedChangeListener
(
this
)
tv_vip_back
.
setOnClickListener
(
this
)
}
override
fun
onItemClick
(
position
:
Int
,
view
:
View
)
{
...
...
video/app/src/main/java/com/duben/loveplayletu/ui/widgets/VipBackDialog.kt
0 → 100644
View file @
7bb023f2
package
com.duben.loveplayletu.ui.widgets
import
android.app.Dialog
import
android.content.Context
import
android.graphics.Color
import
android.view.Gravity
import
android.view.View
import
android.view.WindowManager
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
com.duben.loveplayletu.R
import
com.duben.loveplayletu.utils.SpanUtils
class
VipBackDialog
(
private
val
context
:
Context
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
private
val
lp
:
WindowManager
.
LayoutParams
private
val
tv_text1
:
TextView
private
val
tv_text2
:
TextView
private
val
tv_ok
:
TextView
init
{
setContentView
(
R
.
layout
.
dialog_vip_back
)
// 设置window属性
lp
=
window
!!
.
attributes
lp
.
gravity
=
Gravity
.
CENTER
lp
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
window
!!
.
attributes
=
lp
tv_text1
=
findViewById
<
View
>(
R
.
id
.
tv_text1
)
as
TextView
tv_text2
=
findViewById
<
View
>(
R
.
id
.
tv_text2
)
as
TextView
tv_ok
=
findViewById
<
View
>(
R
.
id
.
tv_ok
)
as
TextView
tv_text1
.
text
=
SpanUtils
()
.
append
(
"参与条件:"
)
.
setBold
()
.
setForegroundColor
(
Color
.
BLACK
)
.
append
(
" 全额返活动仅限带有“下单立返标签的会员套餐参与,购买套餐且开通自动续费持续30分钟以上的用户可获得全额返资格;"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
gray
))
.
create
()
tv_text2
.
text
=
SpanUtils
()
.
append
(
"返还时间:"
)
.
setBold
()
.
setForegroundColor
(
Color
.
BLACK
)
.
append
(
" 获得资格的用户在购买套餐并开通自动续费后的30分钟内返还。"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
gray
))
.
create
()
tv_ok
.
setOnClickListener
{
dismiss
()
}
}
}
\ No newline at end of file
video/app/src/main/res/drawable/shape_vip_back.xml
0 → 100644
View file @
7bb023f2
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"90"
android:endColor=
"#FBF3DE"
android:startColor=
"#ffffff"
/>
<corners
android:radius=
"15dip"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/layout/activity_new_vip.xml
View file @
7bb023f2
...
...
@@ -106,7 +106,6 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/bg_vip_2"
/>
<ImageView
...
...
@@ -265,5 +264,14 @@
android:textSize=
"20sp"
/>
</io.supercharge.shimmerlayout.ShimmerLayout>
<TextView
android:id=
"@+id/tv_vip_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:text=
"全额返规则"
android:textColor=
"#97ffffff"
android:textSize=
"12sp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/layout/dialog_vip_back.xml
0 → 100644
View file @
7bb023f2
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_marginStart=
"40dp"
android:layout_marginEnd=
"40dp"
android:background=
"@drawable/shape_vip_back"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"20dp"
android:layout_marginEnd=
"20dp"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:text=
"客服联系方式"
android:textColor=
"@color/black"
android:textSize=
"18sp"
/>
<TextView
android:id=
"@+id/tv_text1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"20dp"
android:lineSpacingExtra=
"4dp"
android:text=
"点击拨打"
android:textColor=
"#828383"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tv_text2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"@dimen/dp_4"
android:lineSpacingExtra=
"4dp"
android:text=
"点击拨打"
android:textColor=
"#828383"
android:textSize=
"14sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_ok"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_gravity=
"center"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"30dp"
android:layout_marginEnd=
"20dp"
android:layout_marginBottom=
"20dp"
android:background=
"@drawable/shape_red"
android:gravity=
"center"
android:text=
"我知道了"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
</RelativeLayout>
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