Commit c18a1614 authored by xw's avatar xw

[提交人]:王雪伟

[提交简述] :多多菜园1.0.8
[实现方案] :大图广告在1.5s后加载下一条
parent 315d21e4
......@@ -61,7 +61,7 @@ class BaseApplication : BaseApplication() {
//TODO 上线去掉测试地址
// NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/"
// NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/"
// Constant.appLs = "afcbef40e31631d3"//appls
AdManager.init(this,"afcbef40e31631d3")
LogUtils.getConfig().logSwitch = true
......
......@@ -77,19 +77,29 @@ object AdUtils {
return
}
activity?.runOnUiThread() {
Log.d(TAG, "loadFeedCacheAdToCache展示广告")
AdManager.showFeedAd(
ADConfig.AD_IMG_FADE,
actionName,
ZXADSizeConfig(
Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40, 280
// Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40,
// ((Utils.px2dip(activity.windowManager?.defaultDisplay?.width!!.toFloat()) - 40) * 0.66).toInt()
// Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40, 280
Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40,
((Utils.px2dip(activity.windowManager?.defaultDisplay?.width!!.toFloat()) - 40) * 0.66).toInt()
),
activity,
view
)
}
view.postDelayed(object :Runnable {
override fun run() {
AdManager.loadFeedAdToCache(
ADConfig.AD_IMG_FADE, activity, ZXADSizeConfig(
// Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40, 280
Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40,
((Utils.px2dip(activity.windowManager?.defaultDisplay?.width!!.toFloat()) - 40) * 0.66).toInt()
)
)
}
},1500)
} catch (e: Exception) {
}
......@@ -102,14 +112,13 @@ object AdUtils {
//预加载信息流
fun loadFeedCacheAdToCache(activity: Activity) {
Log.d(TAG, "loadFeedCacheAdToCache吓一跳广告")
AdManager.loadFeedAdToCache(
ADConfig.AD_IMG_FADE, activity, ZXADSizeConfig(
Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40, 280
// AdManager.loadFeedAdToCache(
// ADConfig.AD_IMG_FADE, activity, ZXADSizeConfig(
//// Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40, 280
// Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 40,
// ((Utils.px2dip(activity.windowManager?.defaultDisplay?.width!!.toFloat()) - 40) * 0.66).toInt()
)
)
// )
// )
}
//看视频领上报
......
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