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,29 +51,31 @@ object AdUtils { ...@@ -51,29 +51,31 @@ object AdUtils {
fun showFeedAd(activity: Activity, actionName: String, view: FrameLayout) { fun showFeedAd(activity: Activity, actionName: String, view: FrameLayout) {
try { AdManager.showFeedAd(
view.postDelayed(object :Runnable { ADConfig.AD_IMG_FADE,
override fun run() { actionName,
if(activity?.isFinishing){ ZXADSizeConfig(
return // Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40, 280
} Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 56,
activity?.runOnUiThread() { ((Utils.px2dip(activity.windowManager?.defaultDisplay?.width!!.toFloat()) - 56) * 0.66).toInt()
AdManager.showFeedAd( ),
ADConfig.AD_IMG_FADE, activity,
actionName, view
ZXADSizeConfig( )
// Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40, 280 // try {
Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 56, // view.postDelayed(object :Runnable {
((Utils.px2dip(activity.windowManager?.defaultDisplay?.width!!.toFloat()) - 56) * 0.66).toInt() // override fun run() {
), // if(activity?.isFinishing){
activity, // return
view // }
) //
} // activity?.runOnUiThread() {
} //
},500) // }
} catch (e: Exception) { // }
} // },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