Commit b1546873 authored by wanglei's avatar wanglei

...

parent a77bbcce
......@@ -28,18 +28,15 @@ object AdmobBannerUtils {
if (isShowBanner == 0 && !BuildConfig.DEBUG) {
return
}
parent.removeAllViews()
adView?.destroy()
adView = null
adView = AdView(context)
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
val adWidth = (parent.width / screenPixelDensity).toInt()
......
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