Commit 510351f4 authored by jyx's avatar jyx

添加饭补页面信息流

parent f4929c61
...@@ -301,7 +301,6 @@ class GroMoreExpressManager : TTSettingConfigCallback { ...@@ -301,7 +301,6 @@ class GroMoreExpressManager : TTSettingConfigCallback {
return convertView return convertView
} }
/** /**
* @param ad * @param ad
* @return * @return
......
...@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys ...@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.ad.express.GroMoreExpressManager import com.mints.goodmoney.ad.express.GroMoreCarrierExpressManager
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import com.mints.goodmoney.manager.TtCsjAdManager
import com.mints.goodmoney.mvp.model.MealBean import com.mints.goodmoney.mvp.model.MealBean
import com.mints.goodmoney.mvp.presenters.FoodSubsidyPresenter import com.mints.goodmoney.mvp.presenters.FoodSubsidyPresenter
import com.mints.goodmoney.mvp.views.FoodSubsidyView import com.mints.goodmoney.mvp.views.FoodSubsidyView
...@@ -51,9 +49,6 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie ...@@ -51,9 +49,6 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
svWalk?.destoryAnim() svWalk?.destoryAnim()
flSubsidykAd?.removeAllViews() flSubsidykAd?.removeAllViews()
GroMoreExpressManager.instance.loadADFrameLayout()
foodSubsidyPresenter.detachView() foodSubsidyPresenter.detachView()
} }
...@@ -92,7 +87,8 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie ...@@ -92,7 +87,8 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
} }
// 预加载信息流 // 预加载信息流
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT) // TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT)
GroMoreCarrierExpressManager.instance.loadADFrameLayout()
} }
...@@ -101,11 +97,11 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie ...@@ -101,11 +97,11 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
*/ */
private fun initExpress() { private fun initExpress() {
try { try {
if (TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout != null) { if (GroMoreCarrierExpressManager.instance.getADFrameLayout() != null) {
if (flSubsidykAd != null) { if (flSubsidykAd != null) {
flSubsidykAd.removeAllViews() flSubsidykAd.removeAllViews()
// flSubsidykAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout) // flSubsidykAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
flSubsidykAd.addView(GroMoreExpressManager.instance.getADFrameLayout()) flSubsidykAd.addView(GroMoreCarrierExpressManager.instance.getADFrameLayout())
} }
} }
} catch (e: Exception) { } catch (e: Exception) {
......
...@@ -5,7 +5,7 @@ import android.view.View ...@@ -5,7 +5,7 @@ import android.view.View
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.ad.express.GroMoreExpressManager import com.mints.goodmoney.ad.express.GroMoreCarrierExpressManager
import com.mints.goodmoney.ad.video.VideoAdingManager import com.mints.goodmoney.ad.video.VideoAdingManager
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager import com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
...@@ -55,8 +55,6 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV ...@@ -55,8 +55,6 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
GroMoreExpressManager.instance.loadADFrameLayout()
flMorningClockAd?.removeAllViews() flMorningClockAd?.removeAllViews()
morningClockPresenter.detachView() morningClockPresenter.detachView()
} }
...@@ -186,10 +184,12 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV ...@@ -186,10 +184,12 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
*/ */
private fun initExpress() { private fun initExpress() {
try { try {
if (flMorningClockAd != null) { if (GroMoreCarrierExpressManager.instance.getADFrameLayout() != null) {
flMorningClockAd.removeAllViews() if (flMorningClockAd != null) {
flMorningClockAd.removeAllViews()
// flMorningClockAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout) // flMorningClockAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
flMorningClockAd.addView(GroMoreExpressManager.instance.getADFrameLayout()) flMorningClockAd.addView(GroMoreCarrierExpressManager.instance.getADFrameLayout())
}
} }
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
......
...@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys ...@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.ad.express.GroMoreExpressManager import com.mints.goodmoney.ad.express.GroMoreCarrierExpressManager
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import com.mints.goodmoney.manager.TtCsjAdManager
import com.mints.goodmoney.mvp.model.WalkBean import com.mints.goodmoney.mvp.model.WalkBean
import com.mints.goodmoney.mvp.presenters.WalkPresenter import com.mints.goodmoney.mvp.presenters.WalkPresenter
import com.mints.goodmoney.mvp.views.WalkView import com.mints.goodmoney.mvp.views.WalkView
...@@ -45,8 +43,6 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St ...@@ -45,8 +43,6 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
GroMoreExpressManager.instance.loadADFrameLayout()
svWalk?.destoryAnim() svWalk?.destoryAnim()
flWalkAd?.removeAllViews() flWalkAd?.removeAllViews()
walkPresenter.detachView() walkPresenter.detachView()
...@@ -102,7 +98,8 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St ...@@ -102,7 +98,8 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
} }
// 预加载信息流 // 预加载信息流
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK) // TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK)
GroMoreCarrierExpressManager.instance.loadADFrameLayout()
} }
/** /**
...@@ -110,11 +107,11 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St ...@@ -110,11 +107,11 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
*/ */
private fun initExpress() { private fun initExpress() {
try { try {
if (TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout != null) { if (GroMoreCarrierExpressManager.instance.getADFrameLayout() != null) {
if (flWalkAd != null) { if (flWalkAd != null) {
flWalkAd.removeAllViews() flWalkAd.removeAllViews()
// flWalkAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout) // flWalkAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
flWalkAd.addView(GroMoreExpressManager.instance.getADFrameLayout()) flWalkAd.addView(GroMoreCarrierExpressManager.instance.getADFrameLayout())
} }
} }
} catch (e: Exception) { } catch (e: Exception) {
......
...@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys ...@@ -3,10 +3,8 @@ package com.mints.goodmoney.ui.activitys
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.ad.express.GroMoreExpressManager import com.mints.goodmoney.ad.express.GroMoreCarrierExpressManager
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import com.mints.goodmoney.manager.TtCsjAdManager
import com.mints.goodmoney.mvp.model.WaterBean import com.mints.goodmoney.mvp.model.WaterBean
import com.mints.goodmoney.mvp.presenters.WaterPresenter import com.mints.goodmoney.mvp.presenters.WaterPresenter
import com.mints.goodmoney.ui.activitys.base.BaseActivity import com.mints.goodmoney.ui.activitys.base.BaseActivity
...@@ -48,8 +46,6 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL ...@@ -48,8 +46,6 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
GroMoreExpressManager.instance.loadADFrameLayout()
// 取消水滴动画 // 取消水滴动画
wvWater?.destoryAnim() wvWater?.destoryAnim()
wvWater?.closeWaterViewTime() wvWater?.closeWaterViewTime()
...@@ -72,7 +68,8 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL ...@@ -72,7 +68,8 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
} }
// 预加载信息流 // 预加载信息流
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WATER) // TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WATER)
GroMoreCarrierExpressManager.instance.loadADFrameLayout()
} }
override fun clickForWaterSuc(waterCoin: Int) { override fun clickForWaterSuc(waterCoin: Int) {
...@@ -114,10 +111,12 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL ...@@ -114,10 +111,12 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
*/ */
private fun initExpress() { private fun initExpress() {
try { try {
if (flWaterAd != null) { if (GroMoreCarrierExpressManager.instance.getADFrameLayout() != null) {
flWaterAd.removeAllViews() if (flWaterAd != null) {
flWaterAd.removeAllViews()
// flWaterAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout) // flWaterAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
flWaterAd.addView(GroMoreExpressManager.instance.getADFrameLayout()) flWaterAd.addView(GroMoreCarrierExpressManager.instance.getADFrameLayout())
}
} }
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
......
...@@ -19,6 +19,7 @@ import com.mints.goodmoney.BuildConfig ...@@ -19,6 +19,7 @@ import com.mints.goodmoney.BuildConfig
import com.mints.goodmoney.MintsApplication import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.ad.banner.BannerManager import com.mints.goodmoney.ad.banner.BannerManager
import com.mints.goodmoney.ad.express.GroMoreCarrierExpressManager
import com.mints.goodmoney.ad.express.PreLoadExpressManager import com.mints.goodmoney.ad.express.PreLoadExpressManager
import com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager import com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager import com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
...@@ -1012,11 +1013,13 @@ class MyFragment : BaseFragment(), ...@@ -1012,11 +1013,13 @@ class MyFragment : BaseFragment(),
readyGo(XiaomanActivity::class.java, bundle) readyGo(XiaomanActivity::class.java, bundle)
} }
Constant.HOT_ACTIVITY_WATER -> { Constant.HOT_ACTIVITY_WATER -> {
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WATER) GroMoreCarrierExpressManager.instance.loadADFrameLayout()
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WATER)
readyGo(WaterActivity::class.java) readyGo(WaterActivity::class.java)
} }
Constant.HOT_ACTIVITY_WALK -> { Constant.HOT_ACTIVITY_WALK -> {
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK) GroMoreCarrierExpressManager.instance.loadADFrameLayout()
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK)
readyGo(WalkActivity::class.java) readyGo(WalkActivity::class.java)
} }
Constant.HOT_ACTIVITY_CARD -> { Constant.HOT_ACTIVITY_CARD -> {
...@@ -1026,7 +1029,8 @@ class MyFragment : BaseFragment(), ...@@ -1026,7 +1029,8 @@ class MyFragment : BaseFragment(),
readyGo(LiebaoGameActivity::class.java) readyGo(LiebaoGameActivity::class.java)
} }
Constant.HOT_ACTIVITY_MORNINGCLOCK -> { Constant.HOT_ACTIVITY_MORNINGCLOCK -> {
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_MORNINGCLOCK) GroMoreCarrierExpressManager.instance.loadADFrameLayout()
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_MORNINGCLOCK)
readyGo(MorningClockActivity::class.java) readyGo(MorningClockActivity::class.java)
} }
Constant.HOT_ACTIVITY_BXM -> { Constant.HOT_ACTIVITY_BXM -> {
...@@ -1106,7 +1110,8 @@ class MyFragment : BaseFragment(), ...@@ -1106,7 +1110,8 @@ class MyFragment : BaseFragment(),
readyGo(WrapperActivity::class.java, bundle) readyGo(WrapperActivity::class.java, bundle)
} }
Constant.HOT_ACTIVITY_EAT -> { Constant.HOT_ACTIVITY_EAT -> {
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT) GroMoreCarrierExpressManager.instance.loadADFrameLayout()
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT)
readyGo(FoodSubsidyActivity::class.java) readyGo(FoodSubsidyActivity::class.java)
} }
Constant.HOT_ACTIVITY_SHARE_NEWS -> { Constant.HOT_ACTIVITY_SHARE_NEWS -> {
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.bytedance.msdk.api.format.TTNativeAdView xmlns:android="http://schemas.android.com/apk/res/android" <com.bytedance.msdk.api.format.TTNativeAdView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
......
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