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
7b02cff9
Commit
7b02cff9
authored
Jan 08, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e4e5a11c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
13 deletions
+6
-13
DetailAdDialog.kt
...n/java/com/duben/xixiplaylet/ui/widgets/DetailAdDialog.kt
+3
-10
TxVideoActivity.kt
...in/java/com/duben/xixiplaylet/video/tx/TxVideoActivity.kt
+2
-2
dialog_detail_ad.xml
video/app/src/main/res/layout/dialog_detail_ad.xml
+1
-1
No files found.
video/app/src/main/java/com/duben/xixiplaylet/ui/widgets/DetailAdDialog.kt
View file @
7b02cff9
...
...
@@ -23,10 +23,7 @@ class DetailAdDialog(private val context: Context, private val listener: DialogL
context
,
R
.
style
.
dialog
)
{
private
val
lp
:
WindowManager
.
LayoutParams
private
val
iv_agreement_quit
:
ImageView
private
val
tv_detail_ad_next
:
TextView
private
val
tv_rule_date1
:
TextView
private
val
tv_rule_date2
:
TextView
private
val
iv_detail_ad_next
:
ImageView
init
{
setContentView
(
R
.
layout
.
dialog_detail_ad
)
...
...
@@ -47,12 +44,8 @@ class DetailAdDialog(private val context: Context, private val listener: DialogL
}
// 查找View
tv_detail_ad_next
=
findViewById
<
View
>(
R
.
id
.
tv_agreement_next
)
as
TextView
iv_agreement_quit
=
findViewById
<
View
>(
R
.
id
.
iv_agreement_quit
)
as
ImageView
tv_rule_date1
=
findViewById
<
View
>(
R
.
id
.
tv_rule_date1
)
as
TextView
tv_rule_date2
=
findViewById
<
View
>(
R
.
id
.
tv_rule_date2
)
as
TextView
iv_agreement_quit
.
setOnClickListener
(
listener
)
tv_detail_ad_next
.
setOnClickListener
(
listener
)
iv_detail_ad_next
=
findViewById
<
View
>(
R
.
id
.
iv_detail_ad_next
)
as
ImageView
iv_detail_ad_next
.
setOnClickListener
(
listener
)
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/xixiplaylet/video/tx/TxVideoActivity.kt
View file @
7b02cff9
...
...
@@ -469,10 +469,10 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
private
fun
adDialog
()
{
detailAdDialog
=
DetailAdDialog
(
context
,
object
:
DialogListener
()
{
override
fun
onClick
(
v
:
View
)
{
if
(
AntiShake
.
check
(
v
.
id
))
return
//
if (AntiShake.check(v.id)) return
when
(
v
.
id
)
{
R
.
id
.
t
v_detail_ad_next
->
{
R
.
id
.
i
v_detail_ad_next
->
{
showAd
()
detailAdDialog
?.
dismiss
()
}
...
...
video/app/src/main/res/layout/dialog_detail_ad.xml
View file @
7b02cff9
...
...
@@ -25,7 +25,7 @@
android:textStyle=
"bold"
></TextView>
<ImageView
android:id=
"@+id/iv_
agreement_qui
t"
android:id=
"@+id/iv_
detail_ad_nex
t"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
...
...
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