From f91a3f3fc10542ed4934a80886dee50545086379 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Mon, 5 Dec 2022 15:08:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E9=97=AA=E9=80=80=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/dialog/AbsDialogFragment.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/AbsDialogFragment.java b/common/src/main/java/com/yunbao/common/dialog/AbsDialogFragment.java index 4771da0ef..c59f81807 100644 --- a/common/src/main/java/com/yunbao/common/dialog/AbsDialogFragment.java +++ b/common/src/main/java/com/yunbao/common/dialog/AbsDialogFragment.java @@ -4,13 +4,16 @@ import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.Window; import android.view.WindowManager; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentManager; import com.yunbao.common.utils.ClickUtil; @@ -34,7 +37,7 @@ public abstract class AbsDialogFragment extends DialogFragment { } else { mRootView = LayoutInflater.from(mContext).inflate(getLayoutId(), null); } - final Dialog dialog = new Dialog(mContext, getDialogStyle()); + Dialog dialog = new Dialog(mContext, getDialogStyle()); dialog.setContentView(mRootView); dialog.setCancelable(canCancel()); dialog.setCanceledOnTouchOutside(canCancel()); @@ -74,4 +77,12 @@ public abstract class AbsDialogFragment extends DialogFragment { return ClickUtil.canClick(); } + @Override + public void show(@NonNull FragmentManager manager, @Nullable String tag) { + try { + super.show(manager, tag); + } catch (Exception e) { + e.printStackTrace(); + } + } }