android.app.ProgressDialog.setButton2()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中android.app.ProgressDialog.setButton2()方法的一些代码示例,展示了ProgressDialog.setButton2()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setButton2()方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:setButton2

ProgressDialog.setButton2介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

ProgressDialog mPrograss=new ProgressDialog(location.this);
     mPrograss.setTitle("loading....");
     mPrograss.setProgressStyle(ProgressDialog.STYLE_SPINNER);
     mPrograss.setMax(1);
     mPrograss.setProgress(2000);
     mPrograss.setButton("save", new DialogInterface.OnClickListener() {
       @Override
       public void onClick(DialogInterface dialog, int which) {
       }
     });
     mPrograss.setButton2("cancel", new DialogInterface.OnClickListener() {
       @Override
       public void onClick(DialogInterface dialog, int which) {
       }
     });
     mPrograss.show();

代码示例来源:origin: tagtime/TagTime

private Dialog progressDialog() {
  mProgress = new ProgressDialog(ManageData.this);
  mProgress.setIcon(R.drawable.alert_dialog_icon);
  mProgress.setTitle(R.string.saving_log);
  mProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
  mProgress.setButton("Hide", new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {
      // TODO Just make dialog go away (Do I need to do anything?)
    }
  });
  mProgress.setButton2("Cancel", new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {
      // TODO Cancel the save	
    }
  });
  return mProgress;
}

代码示例来源:origin: IvanVolosyuk/diskusage

dialog.setButton2(diskUsage.getString(R.string.button_cancel),
  new DialogInterface.OnClickListener() {
 public void onClick(DialogInterface dialog, int which) {

相关文章