Commit a77bbcce authored by wanglei's avatar wanglei

...

parent 360dc0b7
......@@ -28,17 +28,17 @@ object AdmobBannerUtils {
if (isShowBanner == 0 && !BuildConfig.DEBUG) {
return
}
if (adView != null) {
adView?.destroy()
}
adView = null
adView = AdView(context)
// parent.removeAllViews()
val list = parent.children
list.forEach {
if (it.tag != "zhanweitu") {
parent.removeView(it)
}
}
parent.removeAllViews()
// val list = parent.children
// list.forEach {
// if (it.tag != "zhanweitu") {
// parent.removeView(it)
// }
// }
parent.addView(adView)
listener = ViewTreeObserver.OnGlobalLayoutListener {
val screenPixelDensity = context.resources.displayMetrics.density
......
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