Commit 559aa51b authored by jyx's avatar jyx

优量汇信息流测试

parent 81a3d44c
......@@ -25,6 +25,8 @@ object YlhAdManager {
const val YLH_AD_VEDIO_MOREDIALOG_POSTID = "8081132842926080" //签到、气泡、离线弹框
const val YLH_AD_VEDIO_GAME_POSTID = "4021234882122091" //猎豹游戏
/*信息流*/
const val YLH_AD_NATIVEEXPRESS_AWARD = "2071245901560587" //
/* 插屏 */
const val YLH_AD_INTERSTITIALAD_LIEBAO = "5031044115480084" //猎豹
......
package com.mints.goodmoney.manager
import android.view.View
import android.widget.FrameLayout
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.utils.LogUtil
import com.qq.e.ads.nativ.ADSize
import com.qq.e.ads.nativ.NativeExpressAD
import com.qq.e.ads.nativ.NativeExpressADView
......@@ -24,7 +24,7 @@ object YlhPreLoadExpressManager {
try {
ylhFrameLayout = FrameLayout(context)
nativeExpressAD = NativeExpressAD(MintsApplication.getContext(), ADSize(320, ADSize.AUTO_HEIGHT), YlhAdManager.YLH_AD_SPLASH_POSTID, object : NativeExpressAD.NativeExpressADListener {
nativeExpressAD = NativeExpressAD(MintsApplication.getContext(), ADSize(320, ADSize.AUTO_HEIGHT), YlhAdManager.YLH_AD_NATIVEEXPRESS_AWARD, object : NativeExpressAD.NativeExpressADListener {
override fun onNoAD(p0: AdError?) {
}
......@@ -47,9 +47,9 @@ object YlhPreLoadExpressManager {
// 释放前一个展示的NativeExpressADView的资源
nativeExpressADView?.destroy()
if (ylhFrameLayout!!.visibility != View.VISIBLE) {
ylhFrameLayout!!.visibility = View.VISIBLE
}
nativeExpressADView = p0?.get(0)
LogUtil.d("AAAA", "onADLoaded")
if (ylhFrameLayout!!.childCount > 0) {
ylhFrameLayout!!.removeAllViews()
......@@ -75,7 +75,6 @@ object YlhPreLoadExpressManager {
} catch (e: Exception) {
e.printStackTrace()
}
ylhFrameLayout = null
}
/**
......
......@@ -102,7 +102,7 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
try {
// ttNativeExpressManager.initTTAd(false)
// ttNativeExpressManager.getNativeExpressInit(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT, flWalkAd, 320f, 0f)
YlhPreLoadExpressManager.loadYlhFrameLayout()
// YlhPreLoadExpressManager.loadYlhFrameLayout()
flWalkAd.addView(YlhPreLoadExpressManager.getYlhFrameLayout())
} catch (e: Exception) {
e.printStackTrace()
......
......@@ -22,6 +22,7 @@ import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.BxmManager
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.manager.YlhPreLoadExpressManager
import com.mints.goodmoney.manager.YwhzManager
import com.mints.goodmoney.mvp.model.*
import com.mints.goodmoney.mvp.presenters.MyPresenter
......@@ -145,6 +146,8 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
override fun onResume() {
super.onResume()
YlhPreLoadExpressManager.loadYlhFrameLayout()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_MY) {
if (!TextUtils.isEmpty(userManager.userID)) {
myPresenter.getAutoUserHallBaseMsg()
......
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