Commit 0edc09f2 authored by jyx's avatar jyx

去除信息流广告

parent 161702eb
...@@ -77,7 +77,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener { ...@@ -77,7 +77,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
pushAward() pushAward()
} }
initExpress() // initExpress()
initListener() initListener()
initDataView() initDataView()
} }
...@@ -398,7 +398,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener { ...@@ -398,7 +398,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
SoundPoolUtil.getInstance().onDestory() SoundPoolUtil.getInstance().onDestory()
PreLoadExpressManager.onDestroy() PreLoadExpressManager.onDestroy()
flAwardAd?.removeAllViews() // flAwardAd?.removeAllViews()
videoAdingManager.setVideoAdingListener(null) videoAdingManager.setVideoAdingListener(null)
videoAdingManager.onDestroy() videoAdingManager.onDestroy()
......
...@@ -47,7 +47,7 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV ...@@ -47,7 +47,7 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
initExpress() // initExpress()
morningClockPresenter.getUpEarlySignMsg() morningClockPresenter.getUpEarlySignMsg()
} }
......
...@@ -37,7 +37,7 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St ...@@ -37,7 +37,7 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
initExpress() // initExpress()
walkPresenter.getWalkMsg() walkPresenter.getWalkMsg()
} }
......
...@@ -34,7 +34,7 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL ...@@ -34,7 +34,7 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
initExpress() // initExpress()
waterPresenter.getWaterMsg() waterPresenter.getWaterMsg()
} }
......
...@@ -35,7 +35,7 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base ...@@ -35,7 +35,7 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); // getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
if (android.os.Build.VERSION.SDK_INT != Build.VERSION_CODES.O) { if (android.os.Build.VERSION.SDK_INT != Build.VERSION_CODES.O) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
......
...@@ -111,8 +111,8 @@ class MyFragment : BaseFragment(), ...@@ -111,8 +111,8 @@ class MyFragment : BaseFragment(),
private var mainMyAdapter: MainMyAdapter? = null private var mainMyAdapter: MainMyAdapter? = null
// Banner // Banner
private var mAdBannerAdapter: AdBannerAdapter? = null // private var mAdBannerAdapter: AdBannerAdapter? = null
private var mBannerData: RotationChartBean? = null // private var mBannerData: RotationChartBean? = null
// 高额任务 // 高额任务
private var mCurrentPkg: String? = null private var mCurrentPkg: String? = null
...@@ -144,7 +144,7 @@ class MyFragment : BaseFragment(), ...@@ -144,7 +144,7 @@ class MyFragment : BaseFragment(),
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
banner_view.stopAutoScroll() // banner_view.stopAutoScroll()
item_clock_signview.stopRedbox() item_clock_signview.stopRedbox()
} }
...@@ -216,7 +216,7 @@ class MyFragment : BaseFragment(), ...@@ -216,7 +216,7 @@ class MyFragment : BaseFragment(),
myPresenter.getSignInHomePageMsg() myPresenter.getSignInHomePageMsg()
myPresenter.myHotActivity() myPresenter.myHotActivity()
myPresenter.getHallBaseMsg() myPresenter.getHallBaseMsg()
myPresenter.myRotationChart() // myPresenter.myRotationChart()
userConfig = data userConfig = data
handleRecyData() handleRecyData()
...@@ -365,33 +365,33 @@ class MyFragment : BaseFragment(), ...@@ -365,33 +365,33 @@ class MyFragment : BaseFragment(),
* 设置Banner * 设置Banner
*/ */
override fun getMyRotationChartSuc(data: RotationChartBean) { override fun getMyRotationChartSuc(data: RotationChartBean) {
mBannerData = data // mBannerData = data
//
if (mBannerData?.list == null || mBannerData?.list!!.size == 0) { // if (mBannerData?.list == null || mBannerData?.list!!.size == 0) {
mAdBannerAdapter = null // mAdBannerAdapter = null
//
fl_my_banner.visibility = View.VISIBLE // fl_my_banner.visibility = View.VISIBLE
LogUtil.d("TAG", "getMyRotationChartSuc") // LogUtil.d("TAG", "getMyRotationChartSuc")
banner_view.visibility = View.GONE // banner_view.visibility = View.GONE
banner_view.stopAutoScroll() // banner_view.stopAutoScroll()
BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner) // BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
} else { // } else {
//
fl_my_banner.visibility = View.GONE // fl_my_banner.visibility = View.GONE
banner_view.visibility = View.VISIBLE // banner_view.visibility = View.VISIBLE
mAdBannerAdapter = AdBannerAdapter(activity) // mAdBannerAdapter = AdBannerAdapter(activity)
//
mAdBannerAdapter?.let { // mAdBannerAdapter?.let {
val list: MutableList<RotationChartBean.ListBean?> = mutableListOf() // val list: MutableList<RotationChartBean.ListBean?> = mutableListOf()
list.addAll(mBannerData?.list!!) // list.addAll(mBannerData?.list!!)
list.add(data.position, null) // list.add(data.position, null)
it.setOnPageClickListener(this) // it.setOnPageClickListener(this)
it.setData(list) // it.setData(list)
it.setAdPosition(data.position) // it.setAdPosition(data.position)
banner_view.setAdapter(it) // banner_view.setAdapter(it)
} // }
banner_view.startAutoScroll() // banner_view.startAutoScroll()
} // }
} }
override fun onRefresh(refreshLayout: RefreshLayout) { override fun onRefresh(refreshLayout: RefreshLayout) {
...@@ -1505,24 +1505,24 @@ class MyFragment : BaseFragment(), ...@@ -1505,24 +1505,24 @@ class MyFragment : BaseFragment(),
* Banner点击事件 * Banner点击事件
*/ */
override fun onPageClick(position: Int) { override fun onPageClick(position: Int) {
mBannerData?.let { // mBannerData?.let {
// 广告不在最后banner展示时,需要position-1,否则加入穿山甲广告导致数据越界 // // 广告不在最后banner展示时,需要position-1,否则加入穿山甲广告导致数据越界
var serverBannerPosition = position // var serverBannerPosition = position
if (it.list.size != it.position) { // if (it.list.size != it.position) {
serverBannerPosition = position - 1 // serverBannerPosition = position - 1
} // }
//
val pkg = it.list[serverBannerPosition].pkg // val pkg = it.list[serverBannerPosition].pkg
if (!TextUtils.isEmpty(pkg) && AppUtil.checkPackInfo(requireActivity(), pkg)) { // if (!TextUtils.isEmpty(pkg) && AppUtil.checkPackInfo(requireActivity(), pkg)) {
AppTryPlayManager.toTryPlay(pkg) // AppTryPlayManager.toTryPlay(pkg)
} else { // } else {
//未安装 // //未安装
val bundle = Bundle() // val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, it.list[serverBannerPosition].title) // bundle.putString(WebActivity.WEB_TITLE, it.list[serverBannerPosition].title)
bundle.putString(WebActivity.WEB_URL, it.list[serverBannerPosition].url) // bundle.putString(WebActivity.WEB_URL, it.list[serverBannerPosition].url)
readyGo(WebActivity::class.java, bundle) // readyGo(WebActivity::class.java, bundle)
} // }
} // }
} }
} }
\ No newline at end of file
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