Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
File Recovery RecycleBin
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
wanglei
File Recovery RecycleBin
Commits
bc84277a
Commit
bc84277a
authored
Jul 16, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6caecc70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
AdMaxInterstitialUtils.kt
.../filerecoveryrecyclebin/ads/max/AdMaxInterstitialUtils.kt
+26
-26
No files found.
app/src/main/java/com/base/filerecoveryrecyclebin/ads/max/AdMaxInterstitialUtils.kt
View file @
bc84277a
...
@@ -129,33 +129,33 @@ object AdMaxInterstitialUtils {
...
@@ -129,33 +129,33 @@ object AdMaxInterstitialUtils {
onHidden
:
(()
->
Unit
)?,
onHidden
:
(()
->
Unit
)?,
interval
:
Int
interval
:
Int
)
{
)
{
if
(!
isShowDialog
)
{
//
if (!isShowDialog) {
return
//
return
}
//
}
//
if
(
customDialog
!=
null
&&
customDialog
?.
isShowing
==
true
)
{
//
if (customDialog != null && customDialog?.isShowing == true) {
return
// 如果对话框已经显示,则不再显示
//
return // 如果对话框已经显示,则不再显示
}
//
}
//
customDialog
=
CustomDialog
(
activity
,
R
.
layout
.
dialog_ad_loading
)
//
customDialog = CustomDialog(activity, R.layout.dialog_ad_loading)
customDialog
?.
setCountdownText
(
R
.
id
.
dialog_ad_loading_text
)
//
customDialog?.setCountdownText(R.id.dialog_ad_loading_text)
val
countdownTimer
=
object
:
CountDownTimer
((
interval
*
1000
).
toLong
(),
1000
)
{
//
val countdownTimer = object : CountDownTimer((interval * 1000).toLong(), 1000) {
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
//
override fun onTick(millisUntilFinished: Long) {
val
seconds
=
(
millisUntilFinished
/
1000
).
toInt
()
//
val seconds = (millisUntilFinished / 1000).toInt()
customDialog
?.
updateCountdownText
(
"Advertising in preparation ($seconds"
+
"s)..."
)
//
customDialog?.updateCountdownText("Advertising in preparation ($seconds" + "s)...")
}
//
}
//
override
fun
onFinish
()
{
//
override fun onFinish() {
if
(!
activity
.
isDestroyed
&&
!
activity
.
isFinishing
)
{
//
if (!activity.isDestroyed && !activity.isFinishing) {
customDialog
?.
dismiss
()
//
customDialog?.dismiss()
}
//
}
customDialog
=
null
//
customDialog = null
LogEx
.
logDebug
(
TAG
,
"onFinish"
)
//
LogEx.logDebug(TAG, "onFinish")
interstitialAd
?.
showAd
()
interstitialAd
?.
showAd
()
}
//
}
}
//
}
countdownTimer
.
start
()
//
countdownTimer.start()
customDialog
?.
show
()
//
customDialog?.show()
}
}
private
fun
showAdDialogAndLoadInterstitial
(
private
fun
showAdDialogAndLoadInterstitial
(
...
...
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