com.qmuiteam.qmui.widget.dialog.QMUIDialogAction Java Examples

The following examples show how to use com.qmuiteam.qmui.widget.dialog.QMUIDialogAction. 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: UserLoginActivity.java    From v9porn with MIT License 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_user_register) {
        new QMUIDialog.MessageDialogBuilder(this)
                .setMessage("注册功能已停止支持,请去9*porn官网注册,之后再来登录!")
                .addAction("知道了", new QMUIDialogAction.ActionListener() {
                    @Override
                    public void onClick(QMUIDialog dialog, int index) {
                        dialog.dismiss();
                    }
                })
                .show();
        return true;
    }

    return super.onOptionsItemSelected(item);
}
 
Example #2
Source File: Browse9PForumActivity.java    From v9porn with MIT License 6 votes vote down vote up
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: UserLoginActivity.java    From v9porn with MIT License 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_user_register) {
        new QMUIDialog.MessageDialogBuilder(this)
                .setMessage("注册功能已停止支持,请去9*porn官网注册,之后再来登录!")
                .addAction("知道了", new QMUIDialogAction.ActionListener() {
                    @Override
                    public void onClick(QMUIDialog dialog, int index) {
                        dialog.dismiss();
                    }
                })
                .show();
        return true;
    }

    return super.onOptionsItemSelected(item);
}
 
Example #4
Source File: Browse9PForumActivity.java    From v9porn with MIT License 6 votes vote down vote up
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: WelcomeActivity.java    From BlogDemo with Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // 解决Android应用Launcher重复启动的问题
    if (!isTaskRoot() && getIntent() != null) {
        String action = getIntent().getAction();
        if (getIntent().hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN.equals(action)) {
            finish();
            return;
        }
    }
    setContentView(R.layout.activity_welcome);

    // 全屏,透明状态栏
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        View decorView = getWindow().getDecorView();
        int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
        decorView.setSystemUiVisibility(option);
        getWindow().setStatusBarColor(Color.TRANSPARENT);
    }

    new QMUIDialog.MessageDialogBuilder(this)
            .setMessage("服务器地址为:" + BuildConfig.SERVER_URL)
            .addAction(R.string.btn_confirm, new QMUIDialogAction.ActionListener() {
                @Override
                public void onClick(QMUIDialog dialog, int index) {
                    dialog.dismiss();
                    new Handler().postDelayed(new Runnable() {
                        @Override
                        public void run() {
                            MainActivity.actionStart(WelcomeActivity.this);
                            finish();
                        }
                    }, 1500);
                }
            })
            .show();
}
 
Example #6
Source File: SearchActivity.java    From v9porn with MIT License 5 votes vote down vote up
private void showTipDialog() {
    new QMUIDialog.MessageDialogBuilder(this)
            .setTitle("提示")
            .setMessage("1 .普通用户搜索间隔时间10分钟,VIP搜索间隔时间10秒\n" +
                    "2 .搜索视频标题显示不全,属于正常现象(官网就是如此)\n" +
                    "3 .目前暂无办法破除搜索时间限制")
            .addAction("知道了", new QMUIDialogAction.ActionListener() {
                @Override
                public void onClick(QMUIDialog dialog, int index) {
                    dialog.dismiss();
                }
            })
            .show();
}
 
Example #7
Source File: SettingActivity.java    From v9porn with MIT License 5 votes vote down vote up
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: SearchActivity.java    From v9porn with MIT License 5 votes vote down vote up
private void showTipDialog() {
    new QMUIDialog.MessageDialogBuilder(this)
            .setTitle("提示")
            .setMessage("1 .普通用户搜索间隔时间10分钟,VIP搜索间隔时间10秒\n" +
                    "2 .搜索视频标题显示不全,属于正常现象(官网就是如此)\n" +
                    "3 .目前暂无办法破除搜索时间限制")
            .addAction("知道了", new QMUIDialogAction.ActionListener() {
                @Override
                public void onClick(QMUIDialog dialog, int index) {
                    dialog.dismiss();
                }
            })
            .show();
}
 
Example #9
Source File: SettingActivity.java    From v9porn with MIT License 5 votes vote down vote up
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();
}