本文整理了Java中androidx.appcompat.app.AlertDialog.setCanceledOnTouchOutside()
方法的一些代码示例,展示了AlertDialog.setCanceledOnTouchOutside()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AlertDialog.setCanceledOnTouchOutside()
方法的具体详情如下:
包路径:androidx.appcompat.app.AlertDialog
类名称:AlertDialog
方法名:setCanceledOnTouchOutside
暂无
代码示例来源:origin: proninyaroslav/libretorrent
@Override
public void onShow(AlertDialog dialog)
{
dialog.setCanceledOnTouchOutside(false);
}
}
代码示例来源:origin: AlexMofer/ProjectX
builder.setCancelable(false);
mDLoading = builder.create();
mDLoading.setCanceledOnTouchOutside(false);
代码示例来源:origin: 8enet/AppOpsX
.create();
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();
Window window = alertDialog.getWindow();
代码示例来源:origin: MCMrARM/revolution-irc
public AlertDialog createDownloadApprovalDialog(Context context,
ActivityDialogHandler handler) {
String title;
if (getFileSize() > 0)
title = context.getString(R.string.dcc_approve_download_title_with_size,
getUnescapedFileName(), FormatUtils.formatByteSize(getFileSize()));
else
title = context.getString(R.string.dcc_approve_download_title,
getUnescapedFileName());
AlertDialog ret = new AlertDialog.Builder(context)
.setTitle(title)
.setMessage(context.getString(R.string.dcc_approve_download_body,
mSender.toString(), getServerName()))
.setPositiveButton(R.string.action_accept,
(DialogInterface dialog, int which) -> {
if (needsAskSystemDownloadsPermission())
handler.askSystemDownloadsPermission(() -> approve());
else
approve();
})
.setNegativeButton(R.string.action_reject,
(DialogInterface dialog, int which) -> reject())
.setOnCancelListener((DialogInterface dialog) -> reject())
.create();
ret.setCanceledOnTouchOutside(false);
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!