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(); + } + } }