作者:191568022_5d2113 | 来源:互联网 | 2023-09-17 10:53
本文整理了Java中com.afollestad.materialdialogs.MaterialDialog.setOnDismissListener()方法的一些代
本文整理了Java中com.afollestad.materialdialogs.MaterialDialog.setOnDismissListener()
方法的一些代码示例,展示了MaterialDialog.setOnDismissListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MaterialDialog.setOnDismissListener()
方法的具体详情如下:
包路径:com.afollestad.materialdialogs.MaterialDialog
类名称:MaterialDialog
方法名:setOnDismissListener
MaterialDialog.setOnDismissListener介绍
暂无
代码示例
代码示例来源:origin: Swati4star/Images-to-PDF
/**
* To modify page size
*/
public void setPageSize() {
PageSizeUtils utils = new PageSizeUtils(mActivity);
MaterialDialog materialDialog = utils.showPageSizeDialog(true);
materialDialog.setOnDismissListener(dialog -> showSettingsOptions());
}
代码示例来源:origin: jahirfiquitiva/IconShowcase
.build();
dialog.setOnDismissListener(listener);
代码示例来源:origin: jahirfiquitiva/IconShowcase
public static MaterialDialog buildLicenseSuccessDialog(Context context,
MaterialDialog.SingleButtonCallback
onPositive,
MaterialDialog.OnDismissListener
onDismiss,
MaterialDialog.OnCancelListener
onCancel) {
String message = context.getResources().getString(R.string.license_success,
context.getResources().getString(R.string.app_name));
MaterialDialog licenseSuccessDialog = new MaterialDialog.Builder(context)
.title(R.string.license_success_title)
.content(message)
.positiveText(R.string.close)
.onPositive(onPositive)
.build();
licenseSuccessDialog.setOnCancelListener(onCancel);
licenseSuccessDialog.setOnDismissListener(onDismiss);
return licenseSuccessDialog;
}
代码示例来源:origin: jahirfiquitiva/IconShowcase
shallNotPassDialog.setOnCancelListener(onCancel);
if (onDismiss != null)
shallNotPassDialog.setOnDismissListener(onDismiss);
代码示例来源:origin: jahirfiquitiva/IconShowcase
private void showWallpaperAppliedDialog() {
if (dialogApply != null) {
dialogApply.dismiss();
}
dialogApply = new MaterialDialog.Builder(this)
.content(R.string.set_as_wall_done)
.positiveText(android.R.string.ok)
.show();
dialogApply.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (callback != null) {
callback.onDialogDismissed();
}
}
});
}
代码示例来源:origin: jahirfiquitiva/IconShowcase
@Override
public void onSuccess() {
if (applyDialog != null) {
applyDialog.dismiss();
}
applyDialog = new MaterialDialog.Builder(context)
.content(R.string.set_as_wall_done)
.positiveText(android.R.string.ok)
.show();
applyDialog.setOnDismissListener(
new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (((ShowcaseActivity) context).getPickerKey() ==
Config.WALLS_PICKER) {
((ShowcaseActivity) context).finish();
}
}
});
}
代码示例来源:origin: jahirfiquitiva/IconShowcase
public static void showApplyWallpaperDialog(final Context context,
MaterialDialog.SingleButtonCallback onPositive,
MaterialDialog.SingleButtonCallback onNeutral,
MaterialDialog.SingleButtonCallback onNegative,
MaterialDialog.OnDismissListener onDismiss) {
MaterialDialog dialog = new MaterialDialog.Builder(context)
.title(R.string.apply)
.content(R.string.confirm_apply)
.positiveText(R.string.apply)
.neutralText(R.string.crop)
.negativeText(android.R.string.cancel)
.onPositive(onPositive)
.onNeutral(onNeutral)
.onNegative(onNegative)
.build();
dialog.setOnDismissListener(onDismiss);
dialog.show();
}
代码示例来源:origin: jahirfiquitiva/IconShowcase
public static MaterialDialog buildLicenseErrorDialog(Context context,
MaterialDialog.SingleButtonCallback
onPositive,
MaterialDialog.SingleButtonCallback
onNegative,
MaterialDialog.OnDismissListener onDismiss,
MaterialDialog.OnCancelListener onCancel) {
MaterialDialog.Builder licenseErrorDialogBuilder = new MaterialDialog.Builder(context)
.title(R.string.error)
.content(R.string.license_error)
.autoDismiss(false);
if (onPositive != null) {
licenseErrorDialogBuilder.positiveText(R.string.retry);
licenseErrorDialogBuilder.onPositive(onPositive);
}
if (onNegative != null) {
licenseErrorDialogBuilder.negativeText(R.string.exit);
licenseErrorDialogBuilder.onNegative(onNegative);
}
MaterialDialog licenseErrorDialog = licenseErrorDialogBuilder.build();
if (onCancel != null)
licenseErrorDialog.setOnCancelListener(onCancel);
if (onDismiss != null)
licenseErrorDialog.setOnDismissListener(onDismiss);
return licenseErrorDialog;
}