本文整理了Java中android.app.ProgressDialog.setButton2()
方法的一些代码示例,展示了ProgressDialog.setButton2()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setButton2()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称: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) {
内容来源于网络,如有侵权,请联系作者删除!