首页 > 学院 > 开发设计 > 正文

对话框的使用 AlertDialog 和ProgressDialog

2019-11-09 18:46:17
字体:
来源:转载
供稿:网友
PRogressDialog的使用        progressDialog = new ProgressDialog(mContext);        progressDialog.setMessage("路径规划中");//        progressDialog.setCancelable(false);//按对话框以外的地方不起作用。按返回键也不起作用        progressDialog.setCanceledOnTouchOutside(false);//按对话框以外的地方不起作用。按返回键还起作用        progressDialog.show();setCancelable(false);//按对话框以外的地方不起作用。按返回键也不起作用setCanceledOnTouchOutside(false);//按对话框以外的地方不起作用。按返回键还起作用
AlertDialog的使用AlertDialog alertDialog = new AlertDialog.Builder(mContext).create();alertDialog.show();也可以直接使用 AlertDialog alertDialog = new AlertDialog.Builder(mContext).show();public AlertDialog show() {    final AlertDialog dialog = create();    dialog.show();    return dialog;}通过源码分析,发现,show是先create,然后show


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表