Commit 934ec803 authored by wanglei's avatar wanglei

...

parent d1034bae
......@@ -31,7 +31,7 @@ object AdmobNativeUtils {
private val mRequest = AdRequest.Builder().build()
var onAdLoaded: (() -> Unit)? = null
fun loadNativeAd() {
fun loadNativeAd() {
if (nativeAd != null) {
return
}
......@@ -141,4 +141,9 @@ object AdmobNativeUtils {
}
}
fun onDestroy() {
nativeAd?.destroy()
nativeAd = null
}
}
\ No newline at end of file
......@@ -71,6 +71,7 @@ class ExcelActivity : BaseActivity<ActivityExcelBinding>() {
override fun onDestroy() {
super.onDestroy()
binding.mDocView.onDestroy()
AdmobNativeUtils.onDestroy()
}
@SuppressLint("ClickableViewAccessibility")
......
......@@ -85,6 +85,7 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
override fun onDestroy() {
super.onDestroy()
muPDFCore?.onDestroy()
AdmobNativeUtils.onDestroy()
}
override fun initView() {
......
......@@ -87,6 +87,7 @@ class PptActivity : BaseActivity<ActivityPptBinding>() {
override fun onDestroy() {
super.onDestroy()
binding.mDocView.onDestroy()
AdmobNativeUtils.onDestroy()
}
override fun initListener() {
......
......@@ -344,6 +344,7 @@ class WordActivity : BaseActivity<ActivityWordBinding>() {
override fun onDestroy() {
super.onDestroy()
binding.mDocView.onDestroy()
AdmobNativeUtils.onDestroy()
}
}
\ 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