Commit fd8ceb10 authored by maxiaoliang's avatar maxiaoliang

修改金币任务item背景,看广告视频按钮只有立即领取时晃动,修改广告

parent 12f0fb8e
...@@ -71,7 +71,7 @@ class SpeedWaterTaskAdapter : ...@@ -71,7 +71,7 @@ class SpeedWaterTaskAdapter :
holder?.imglucky.visibility=View.VISIBLE holder?.imglucky.visibility=View.VISIBLE
} }
if (data?.buttonSway != null && data?.buttonSway == 1) { if (data?.buttonSway != null && data?.buttonSway == 1&&data?.status!=1) {
startAnimator(holder?.ivStatus) startAnimator(holder?.ivStatus)
} else { } else {
holder?.ivStatus.clearAnimation() holder?.ivStatus.clearAnimation()
......
...@@ -68,7 +68,7 @@ class WateringTaskAdpater : ...@@ -68,7 +68,7 @@ class WateringTaskAdpater :
holder?.imglucky.visibility=View.VISIBLE holder?.imglucky.visibility=View.VISIBLE
} }
if (data?.buttonSway != null && data?.buttonSway == 1) { if (data?.buttonSway != null && data?.buttonSway == 1&&data?.status!=1) {
startAnimator(holder?.ivStatus) startAnimator(holder?.ivStatus)
} else { } else {
startAnimator2(holder?.ivStatus) startAnimator2(holder?.ivStatus)
......
...@@ -613,6 +613,13 @@ object MainDialog { ...@@ -613,6 +613,13 @@ object MainDialog {
onClickListener.onClick(it) onClickListener.onClick(it)
mDialog.dismiss() mDialog.dismiss()
} }
mDialog.setOnDismissListener(object : DialogInterface.OnDismissListener {
override fun onDismiss(p0: DialogInterface?) {
onDestroy()
AdUtils.loadFeedCacheAdToCache(activity)
}
})
mDialog?.setCanceledOnTouchOutside(false) mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false) mDialog?.setCancelable(false)
mDialog?.show() mDialog?.show()
......
...@@ -51,13 +51,6 @@ object AdUtils { ...@@ -51,13 +51,6 @@ object AdUtils {
fun showFeedAd(activity: Activity, actionName: String, view: FrameLayout) { fun showFeedAd(activity: Activity, actionName: String, view: FrameLayout) {
try {
view.postDelayed(object :Runnable {
override fun run() {
if(activity?.isFinishing){
return
}
activity?.runOnUiThread() {
AdManager.showFeedAd( AdManager.showFeedAd(
ADConfig.AD_IMG_FADE, ADConfig.AD_IMG_FADE,
actionName, actionName,
...@@ -69,11 +62,20 @@ object AdUtils { ...@@ -69,11 +62,20 @@ object AdUtils {
activity, activity,
view view
) )
} // try {
} // view.postDelayed(object :Runnable {
},500) // override fun run() {
} catch (e: Exception) { // if(activity?.isFinishing){
} // return
// }
//
// activity?.runOnUiThread() {
//
// }
// }
// },0)
// } catch (e: Exception) {
// }
} }
//预加载激励 //预加载激励
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment