Java Code Examples for com.qmuiteam.qmui.widget.dialog.QMUIDialog#MessageDialogBuilder
The following examples show how to use
com.qmuiteam.qmui.widget.dialog.QMUIDialog#MessageDialogBuilder .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java From v9porn with MIT License | 6 votes |
private void showUpdateDialog(final UpdateVersion updateVersion) { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(this); builder.setTitle("发现新版本--v" + updateVersion.getVersionName()); builder.setMessage(updateVersion.getUpdateMessage()); builder.addAction("立即更新", (dialog, index) -> { dialog.dismiss(); showMessage("开始下载", TastyToast.INFO); Intent intent = new Intent(MainActivity.this, UpdateDownloadService.class); intent.putExtra("updateVersion", updateVersion); startService(intent); }); builder.addAction("稍后更新", (dialog, index) -> dialog.dismiss()); builder.addAction("该版本不再提示", (dialog, index) -> { //保存版本号,用户对于此版本选择了不在提示 presenter.setIgnoreUpdateVersionCode(updateVersion.getVersionCode()); dialog.dismiss(); }); builder.show(); }
Example 2
Source File: Browse9PForumActivity.java From v9porn with MIT License | 6 votes |
private void showTipDialog() { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(this); builder.setTitle("温馨提示"); builder.setMessage("1. 如果你看不到网页内容或者报错了,说明当前页面结构还不支持解析\n" + "2. 在你网速慢或者图片较大或者服务器响应慢的情况下,你会只看到少少的几行文字,这是正常的,你可以多刷新几次试试\n" + "3. 你可以点击某一张图进入浏览图片模式\n" + "4. 目前不支持查看评论及部分网页未适配屏幕宽度"); builder.addAction("我知道了", new QMUIDialogAction.ActionListener() { @Override public void onClick(QMUIDialog dialog, int index) { presenter.setNeedShowTipFirstViewForum9Content(false); dialog.dismiss(); } }); builder.show(); }
Example 3
Source File: MainActivity.java From v9porn with MIT License | 6 votes |
private void showUpdateDialog(final UpdateVersion updateVersion) { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(this); builder.setTitle("发现新版本--v" + updateVersion.getVersionName()); builder.setMessage(updateVersion.getUpdateMessage()); builder.addAction("立即更新", (dialog, index) -> { dialog.dismiss(); showMessage("开始下载", TastyToast.INFO); Intent intent = new Intent(MainActivity.this, UpdateDownloadService.class); intent.putExtra("updateVersion", updateVersion); startService(intent); }); builder.addAction("稍后更新", (dialog, index) -> dialog.dismiss()); builder.addAction("该版本不再提示", (dialog, index) -> { //保存版本号,用户对于此版本选择了不在提示 presenter.setIgnoreUpdateVersionCode(updateVersion.getVersionCode()); dialog.dismiss(); }); builder.show(); }
Example 4
Source File: Browse9PForumActivity.java From v9porn with MIT License | 6 votes |
private void showTipDialog() { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(this); builder.setTitle("温馨提示"); builder.setMessage("1. 如果你看不到网页内容或者报错了,说明当前页面结构还不支持解析\n" + "2. 在你网速慢或者图片较大或者服务器响应慢的情况下,你会只看到少少的几行文字,这是正常的,你可以多刷新几次试试\n" + "3. 你可以点击某一张图进入浏览图片模式\n" + "4. 目前不支持查看评论及部分网页未适配屏幕宽度"); builder.addAction("我知道了", new QMUIDialogAction.ActionListener() { @Override public void onClick(QMUIDialog dialog, int index) { presenter.setNeedShowTipFirstViewForum9Content(false); dialog.dismiss(); } }); builder.show(); }
Example 5
Source File: MainActivity.java From v9porn with MIT License | 5 votes |
private void showNeedSetAddressDialog() { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(context); builder.setTitle("温馨提示"); builder.setMessage("还未设置对应地址,现在去设置?"); builder.addAction("去设置", (dialog, index) -> { dialog.dismiss(); Intent intent = new Intent(context, SettingActivity.class); startActivityWithAnimation(intent); }); builder.addAction("返回", (dialog, index) -> dialog.dismiss()); builder.show(); }
Example 6
Source File: MainActivity.java From v9porn with MIT License | 5 votes |
private void showNewNoticeDialog(final Notice notice) { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(this); builder.setTitle("新公告"); builder.setMessage(notice.getNoticeMessage()); builder.addAction("我知道了", (dialog, index) -> { dialog.dismiss(); presenter.saveNoticeVersionCode(notice.getVersionCode()); }); builder.show(); }
Example 7
Source File: SettingActivity.java From v9porn with MIT License | 5 votes |
private void showForbiddenReleaseMemoryTipInfoDialog() { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(this); builder.setTitle("温馨提示"); builder.setMessage("为了获得较好的体验,新版本程序占用内存较高,这可能导致后台运行而系统内存不足时成为系统回收内存的优先对象(尤其在低内存手机上),因此我做了自动释放内存功能,但这同时也会使体验有所下降,你可以强制关闭次功能,建议开启"); builder.addAction("知道了", new QMUIDialogAction.ActionListener() { @Override public void onClick(QMUIDialog dialog, int index) { dialog.dismiss(); } }); builder.show(); }
Example 8
Source File: MainActivity.java From v9porn with MIT License | 5 votes |
private void showNeedSetAddressDialog() { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(context); builder.setTitle("温馨提示"); builder.setMessage("还未设置对应地址,现在去设置?"); builder.addAction("去设置", (dialog, index) -> { dialog.dismiss(); Intent intent = new Intent(context, SettingActivity.class); startActivityWithAnimation(intent); }); builder.addAction("返回", (dialog, index) -> dialog.dismiss()); builder.show(); }
Example 9
Source File: MainActivity.java From v9porn with MIT License | 5 votes |
private void showNewNoticeDialog(final Notice notice) { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(this); builder.setTitle("新公告"); builder.setMessage(notice.getNoticeMessage()); builder.addAction("我知道了", (dialog, index) -> { dialog.dismiss(); presenter.saveNoticeVersionCode(notice.getVersionCode()); }); builder.show(); }
Example 10
Source File: SettingActivity.java From v9porn with MIT License | 5 votes |
private void showForbiddenReleaseMemoryTipInfoDialog() { QMUIDialog.MessageDialogBuilder builder = new QMUIDialog.MessageDialogBuilder(this); builder.setTitle("温馨提示"); builder.setMessage("为了获得较好的体验,新版本程序占用内存较高,这可能导致后台运行而系统内存不足时成为系统回收内存的优先对象(尤其在低内存手机上),因此我做了自动释放内存功能,但这同时也会使体验有所下降,你可以强制关闭次功能,建议开启"); builder.addAction("知道了", new QMUIDialogAction.ActionListener() { @Override public void onClick(QMUIDialog dialog, int index) { dialog.dismiss(); } }); builder.show(); }