Commit 73722a8e authored by wanglei's avatar wanglei

...ad

parent 42a283f9
......@@ -14,6 +14,7 @@ import com.test.easy.easycleanerjunk.adapter.AppUninstallAdapter
import com.test.easy.easycleanerjunk.bean.AppUninstallBean
import com.test.easy.easycleanerjunk.databinding.ActivityAppManagerBinding
import com.test.easy.easycleanerjunk.helps.BaseActivity
import com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import com.test.easy.easycleanerjunk.utils.BarUtils
import com.test.easy.easycleanerjunk.view.AFunOb
......@@ -76,8 +77,8 @@ class AppManagerActivity : BaseActivity<ActivityAppManagerBinding>() {
launch(Dispatchers.Main) {
binding.progressBar.visibility = View.GONE
adapter.setData(list)
if(list.size>6){
AdmobUtils.showNativeAd(this@AppManagerActivity,binding.flAd)
if (list.size > 6 || mustShowNativeAd) {
AdmobUtils.showNativeAd(this@AppManagerActivity, binding.flAd)
}
}
}
......
......@@ -38,6 +38,7 @@ import com.test.easy.easycleanerjunk.databinding.ActivityLayoutLargeFileBinding
import com.test.easy.easycleanerjunk.databinding.ItemFileFilterBinding
import com.test.easy.easycleanerjunk.databinding.PopupwindowFileFilterBinding
import com.test.easy.easycleanerjunk.helps.BaseActivity
import com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import com.test.easy.easycleanerjunk.helps.LogEx
import com.test.easy.easycleanerjunk.helps.MediaStoreUtils
import com.test.easy.easycleanerjunk.helps.PermissionHelp.checkStorePermission
......@@ -216,7 +217,7 @@ class LargeFileCleanActivity : BaseActivity<ActivityLayoutLargeFileBinding>() {
binding.llSize.isEnabled = true
binding.llTime.isEnabled = true
}
if (largeFileList.size > 6) {
if (largeFileList.size > 6 || mustShowNativeAd) {
AdmobUtils.showNativeAd(this@LargeFileCleanActivity, binding.flAd)
}
}
......
......@@ -14,6 +14,7 @@ import androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SimpleItemAnimator
import com.test.easy.easycleanerjunk.R
import com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
class PhotoListManager(val context: Activity) : OnItemClickListener<PhotoBean>, SpanSizeLookup(), OnClickListener {
......@@ -59,7 +60,7 @@ class PhotoListManager(val context: Activity) : OnItemClickListener<PhotoBean>,
}
override fun onUpdateBtn(isChecked: Boolean, entity: PhotoBean) {
if (entity.size > 6) {
if (entity.size > 6 || mustShowNativeAd) {
val flAd = context.findViewById<FrameLayout>(R.id.fl_ad)
AdmobUtils.showNativeAd(context, flAd)
}
......
......@@ -9,6 +9,7 @@ import com.test.easy.easycleanerjunk.bean.ScreenPhotoBean
import com.test.easy.easycleanerjunk.bean.ScreenshotBean
import com.test.easy.easycleanerjunk.databinding.ActivityScreenShotBinding
import com.test.easy.easycleanerjunk.helps.BaseActivity
import com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import com.test.easy.easycleanerjunk.helps.FileHelps
import com.test.easy.easycleanerjunk.helps.KotlinExt.toFormatSize
import com.test.easy.easycleanerjunk.helps.PermissionHelp.checkStorePermission
......@@ -76,7 +77,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
val sizeF = size.toFormatSize().split(" ")
binding.tvSize.text = sizeF[0]
binding.tvUnit.text = sizeF[1]
if (list.size > 6) {
if (list.size > 6|| mustShowNativeAd) {
AdmobUtils.showNativeAd(this@ScreenShotActivity, binding.flAd)
}
}
......
......@@ -17,6 +17,7 @@ import com.test.easy.easycleanerjunk.bean.ImageDataBean
import com.test.easy.easycleanerjunk.databinding.ActivityLayoutRepeatPhotoBinding
import com.test.easy.easycleanerjunk.helps.BaseActivity
import com.test.easy.easycleanerjunk.helps.BaseApplication
import com.test.easy.easycleanerjunk.helps.ConfigHelper.mustShowNativeAd
import com.test.easy.easycleanerjunk.helps.FileHelps
import com.test.easy.easycleanerjunk.helps.MediaStoreUtils
import com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
......@@ -107,7 +108,7 @@ class RepeatPhotoActivity : BaseActivity<ActivityLayoutRepeatPhotoBinding>() {
binding.idRlList.layoutManager = GridLayoutManager(this, 3)
binding.idRlList.adapter = mAdapter
if (fileList.size > 6) {
if (fileList.size > 6 || mustShowNativeAd) {
AdmobUtils.showNativeAd(this, binding.flAd)
}
}
......
......@@ -25,6 +25,9 @@ object ConfigHelper {
// 正式包名
const val packageName = "com.kk.junkcleaner.easy.zxkk"
//一定展示大图广告
var mustShowNativeAd: Boolean = true
val noLoadingActivities = listOf(
"full", // 过滤全屏广告
"adActivity",
......
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