From 799b8662790850240bc6e7e6d16241c1a8869a3d Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 27 八月 2021 19:02:34 +0800
Subject: [PATCH] 穿山甲广告SDK更新,64位处理器兼容

---
 BuWanVideo/src/com/weikou/beibeivideo/util/ExitDialog.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/BuWanVideo/src/com/weikou/beibeivideo/util/ExitDialog.java b/BuWanVideo/src/com/weikou/beibeivideo/util/ExitDialog.java
index 9fe5045..94aed58 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/util/ExitDialog.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/util/ExitDialog.java
@@ -4,8 +4,10 @@
 import android.app.Dialog;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.widget.FrameLayout;
 
 import com.lcjian.library.util.SystemCommon;
@@ -103,7 +105,7 @@
             View layout = inflater.inflate(R.layout.item_exit, null);
             fl_advertisement = layout.findViewById(R.id.fl_advertisement);
             dialog.addContentView(layout, new FrameLayout.LayoutParams(
-                    FrameLayout.LayoutParams.FILL_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT));
+                    FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT));
             // set the confirm button
             layout.findViewById(R.id.tv_login)
                     .setOnClickListener(new View.OnClickListener() {
@@ -156,12 +158,17 @@
                                             fl_advertisement.removeAllViews();
                                         }
                                     });
+                                    if (adList.get(0).getGdt2() != null) {
+                                        if (adList.get(0).getGdt2().getAdView().getParent() != null) {
+                                            ((ViewGroup) adList.get(0).getGdt2().getAdView().getParent()).removeAllViews();
+                                        }
+                                        fl_advertisement.addView(adList.get(0).getGdt2().getAdView());
+                                    }
                                 }
                             }
 
                             @Override
                             public void onRenderFail(List<ExpressAdContainer> adList) {
-
                             }
                         }, null);
 

--
Gitblit v1.8.0