Commit 0edc09f2 authored by jyx's avatar jyx

去除信息流广告

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