Commit c18a1614 authored by xw's avatar xw

[提交人]:王雪伟

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