Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
zxhc
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
zxhc
Commits
bd542b60
Commit
bd542b60
authored
Apr 16, 2021
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开屏倒计时更换
parent
817d3b71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
ZXHCSplashAD.java
zxhcsdk/src/main/java/com/ym/zxhcsdk/view/ZXHCSplashAD.java
+14
-10
No files found.
zxhcsdk/src/main/java/com/ym/zxhcsdk/view/ZXHCSplashAD.java
View file @
bd542b60
...
...
@@ -129,21 +129,22 @@ public class ZXHCSplashAD {
private
void
countDown
(
int
time
,
TextView
textView
)
{
long
times
=
time
*
1000
;
//时间 倒计时 入参long类型
countDownTimer
=
new
CountDownTimer
(
time
,
1000
)
{
countDownTimer
=
new
CountDownTimer
(
times
,
1000
)
{
@Override
public
void
onTick
(
long
millisUntilFinished
)
{
int
delayTime
=
(
int
)
millisUntilFinished
/
1000
;
delayTime
=
(
int
)
millisUntilFinished
/
1000
;
textView
.
setText
(
delayTime
+
""
);
if
(
delayTime
==
0
){
textView
.
setText
(
"跳过"
);
}
}
@Override
public
void
onFinish
()
{
textView
.
setText
(
""
);
listener
.
OnAdClosed
();
if
(
splashView
!=
null
)
{
ZXHCAdViewManager
.
getInstance
().
removeAdView
(
context
,
splashView
);
}
listener
.
OnAdClosed
();
countDownTimer
.
cancel
();
countDownTimer
=
null
;
}
...
...
@@ -168,14 +169,17 @@ public class ZXHCSplashAD {
ImageView
splashImg
=
view
.
findViewById
(
R
.
id
.
ad_id_hc_Splash_img
);
jumpTv
=
view
.
findViewById
(
R
.
id
.
ad_id_jump_text
);
splashImg
.
setImageBitmap
(
bitmapImg
);
delayTime
=
fetchDelay
;
delayTime
=
fetchDelay
+
1
;
jumpTv
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
delayTime
<=
0
)
{
//listener.OnAdClosed();
ZXHCAdViewManager
.
getInstance
().
removeAdView
(
context
,
vp
);
// mHandler.removeMessages(SPLASH_CODE);
if
(
delayTime
>
0
)
{
if
(
countDownTimer
!=
null
){
countDownTimer
.
cancel
();
countDownTimer
=
null
;
ZXHCAdViewManager
.
getInstance
().
removeAdView
(
context
,
vp
);
listener
.
OnAdClosed
();
}
}
}
});
...
...
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