本文整理了Java中android.app.ProgressDialog.setOwnerActivity()
方法的一些代码示例,展示了ProgressDialog.setOwnerActivity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setOwnerActivity()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:setOwnerActivity
暂无
代码示例来源:origin: WVector/AppUpdate
public static void showProgressDialog(final Activity activity, String msg, boolean cancelable, DialogInterface.OnCancelListener listener) {
if (activity == null || activity.isFinishing()) {
return;
}
if (sCircleProgressDialog == null) {
sCircleProgressDialog = new ProgressDialog(activity);
sCircleProgressDialog.setMessage(msg);
sCircleProgressDialog.setOwnerActivity(activity);
sCircleProgressDialog.setOnCancelListener(listener);
sCircleProgressDialog.setCancelable(cancelable);
} else {
if (activity.equals(sCircleProgressDialog.getOwnerActivity())) {
sCircleProgressDialog.setMessage(msg);
sCircleProgressDialog.setCancelable(cancelable);
sCircleProgressDialog.setOnCancelListener(listener);
} else {
//不相等,所以取消任何ProgressDialog
cancelProgressDialog();
sCircleProgressDialog = new ProgressDialog(activity);
sCircleProgressDialog.setMessage(msg);
sCircleProgressDialog.setCancelable(cancelable);
sCircleProgressDialog.setOwnerActivity(activity);
sCircleProgressDialog.setOnCancelListener(listener);
}
}
if (!sCircleProgressDialog.isShowing()) {
sCircleProgressDialog.show();
}
}
代码示例来源:origin: stackoverflow.com
protected void onPreExecute() {
pd = new ProgressDialog(app);
pd.setOwnerActivity(app);
pd.setTitle("Идет загрузка...");
pd.setCancelable(true);
代码示例来源:origin: geniusgithub/AndroidDialer
getString(R.string.clearCallLogProgress_title),
"", true, false);
progressDialog.setOwnerActivity(getActivity());
final AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() {
@Override
代码示例来源:origin: stackoverflow.com
pd.setOwnerActivity(app);
pd.setTitle("Идет загрузка...");
pd.setCancelable(true);
内容来源于网络,如有侵权,请联系作者删除!