进度条对话框
·//this表示该对话框是针对当前Activity的
·ProgressDialog progressDialog=new ProgressDialog(DialogActivity.this);
·//设置最大值为100
*progressDialog.setMax(100);II
·//设置可以被取消
·progressDialog.setCancelable(true);
·progressDialog.setCanceledOnTouchOutside(true);//点击外部返回
*progressDialog.setProgress(100);//设置进度条
·//设置进度条风格STYLE_HORIZONTAL
·progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
·progressDialog.setTitle(“任务进度”);
*progressDialog.setMessage(“耗时任务完成百分比”);
*progressDialog.setIndeterminate(false);//精确显示
·progressDialog.show();
进度条对话框
最新推荐文章于 2021-08-20 10:04:32 发布