Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckyFarm
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
王雪伟
LuckyFarm
Commits
6cbd4fa2
Commit
6cbd4fa2
authored
Nov 21, 2020
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复代码
parent
e3bb496f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
4 deletions
+55
-4
.gitignore
.gitignore
+3
-1
PuzzleDialog.kt
app/src/main/java/com/ym/game/view/PuzzleDialog.kt
+52
-3
No files found.
.gitignore
View file @
6cbd4fa2
...
...
@@ -28,3 +28,5 @@ userinfo/build
guesssong/*.iml
happyplay/*.iml
userinfo/*.iml
antearn.jks
game/src/main/assets/bin/Data/
app/src/main/java/com/ym/game/view/PuzzleDialog.kt
View file @
6cbd4fa2
...
...
@@ -21,6 +21,8 @@ import android.widget.RelativeLayout
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.airbnb.lottie.LottieAnimationView
import
com.ym.admodule.config.AdManager
import
com.ym.admodule.listener.ZXADVideoListener
import
com.ym.ddcy.R
import
com.ym.game.contract.PuzzleContract
import
com.ym.game.listener.IDialogViewCloseCallback
...
...
@@ -32,6 +34,9 @@ import com.ym.library.rxbus.RxBusUtil
import
com.ym.library.utils.Utils
import
com.ym.modulecommon.AppliContext
import
com.ym.game.adapter.PuzzleBottomAdapter
import
com.ym.library.Constant
import
com.ym.library.utils.ADConfig
import
com.ym.library.utils.EventUtils
import
com.ym.piggybank.adapter.PuzzleTopAdapter
object
PuzzleDialog
:
PuzzleContract
.
View
,
OnRecycleItemClickListener
<
PuzzleEntity
.
PuzzleData
>
{
...
...
@@ -271,7 +276,27 @@ object PuzzleDialog : PuzzleContract.View, OnRecycleItemClickListener<PuzzleEnti
diffCardsNum
,
View
.
OnClickListener
{
Utils
.
showToast
(
AppliContext
.
get
(),
"看广告"
)
AdManager
.
playRewardAd
(
ADConfig
.
AD_VIDEO
,
""
,
context
as
Activity
,
object
:
ZXADVideoListener
{
override
fun
onAdClose
()
{
//视频关闭
Log
.
e
(
"MXL"
,
"ClOSE"
)
mPresenter
?.
onecleanPuzzle
()
AdManager
.
loadNextCacheRewardVideoAd
(
ADConfig
.
AD_VIDEO
,
context
as
Activity
)
}
override
fun
onAdShow
()
{
EventUtils
.
onEvent
(
"show_picture_puzzle_video"
,
"拼图领红包激励视频"
)
}
override
fun
onAdVideoBarClick
()
{}
override
fun
onError
(
errorMsg
:
String
?)
{
//视频播放错误
Log
.
e
(
"MXL"
,
"ERROR"
)
mPresenter
?.
onecleanPuzzle
()
AdManager
.
loadNextCacheRewardVideoAd
(
ADConfig
.
AD_VIDEO
,
context
as
Activity
)
}
override
fun
onSuccess
()
{}
})
})
}
...
...
@@ -297,7 +322,31 @@ object PuzzleDialog : PuzzleContract.View, OnRecycleItemClickListener<PuzzleEnti
// Utils.showToast(AppliContext.get(), "点击" + position)
if
(
data
.
number
==
0
)
{
Utils
.
showToast
(
AppliContext
.
get
(),
"看广告"
)
AdManager
.
playRewardAd
(
ADConfig
.
AD_VIDEO
,
""
,
context
as
Activity
,
object
:
ZXADVideoListener
{
override
fun
onAdClose
()
{
//视频关闭
mPresenter
?.
noputPuzzleData
(
data
.
index
)
AdManager
.
loadNextCacheRewardVideoAd
(
ADConfig
.
AD_VIDEO
,
context
as
Activity
)
}
override
fun
onAdShow
()
{}
override
fun
onAdVideoBarClick
()
{}
override
fun
onError
(
errorMsg
:
String
?)
{
//视频播放错误
mPresenter
?.
noputPuzzleData
(
data
.
index
)
AdManager
.
loadNextCacheRewardVideoAd
(
ADConfig
.
AD_VIDEO
,
context
as
Activity
)
}
override
fun
onSuccess
()
{}
})
}
else
{
mPresenter
?.
putPuzzleData
(
data
.
index
)
}
...
...
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