|
|
@@ -2,6 +2,7 @@ package com.bonait.bnframework.common.utils; |
|
|
|
|
|
|
|
import android.content.Context; |
|
|
|
|
|
|
|
import com.bonait.bnframework.HBL.Logs.MessageLog; |
|
|
|
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; |
|
|
|
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; |
|
|
|
|
|
|
@@ -51,18 +52,24 @@ public class AlertDialogUtils { |
|
|
|
* 对话框,有取消确定按钮 |
|
|
|
* */ |
|
|
|
public static void showDialog(Context context, String title, String message, QMUIDialogAction.ActionListener onClickListener) { |
|
|
|
new QMUIDialog.MessageDialogBuilder(context) |
|
|
|
.setCancelable(false) |
|
|
|
.setTitle(title) |
|
|
|
.setMessage(message) |
|
|
|
.addAction("取消", new QMUIDialogAction.ActionListener() { |
|
|
|
@Override |
|
|
|
public void onClick(QMUIDialog dialog, int index) { |
|
|
|
dialog.dismiss(); |
|
|
|
} |
|
|
|
}) |
|
|
|
.addAction("确定", onClickListener) |
|
|
|
.create(mCurrentDialogStyle).show(); |
|
|
|
try{ |
|
|
|
new QMUIDialog.MessageDialogBuilder(context) |
|
|
|
.setCancelable(false) |
|
|
|
.setTitle(title) |
|
|
|
.setMessage(message) |
|
|
|
.addAction("取消", new QMUIDialogAction.ActionListener() { |
|
|
|
@Override |
|
|
|
public void onClick(QMUIDialog dialog, int index) { |
|
|
|
dialog.dismiss(); |
|
|
|
} |
|
|
|
}) |
|
|
|
.addAction("确定", onClickListener) |
|
|
|
.create(mCurrentDialogStyle).show(); |
|
|
|
}catch(Exception e){ |
|
|
|
MessageLog.ShowError(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static QMUIDialog showDialog111(Context context, String title, String message, QMUIDialogAction.ActionListener onClickListener) { |
|
|
|