本文整理了Java中android.app.ProgressDialog.<init>()
方法的一些代码示例,展示了ProgressDialog.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.<init>()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:<init>
暂无
代码示例来源:origin: stackoverflow.com
ProgressDialog progress = new ProgressDialog(this);
progress.setTitle("Loading");
progress.setMessage("Wait while loading...");
progress.setCancelable(false); // disable dismiss by tapping outside of the dialog
progress.show();
// To dismiss the dialog
progress.dismiss();
代码示例来源:origin: stackoverflow.com
ProgressDialog progress = new ProgressDialog(this);
progress.setMessage("Loading...");
new MyTask(progress).execute();
代码示例来源:origin: crazycodeboy/TakePhoto
/**
* 显示圆形进度对话框
*
* @param activity
* @param progressTitle 显示的标题
* @return
* @author JPH
* Date 2014-12-12 下午7:04:09
*/
public static ProgressDialog showProgressDialog(final Activity activity, String... progressTitle) {
if (activity == null || activity.isFinishing()) {
return null;
}
String title = activity.getResources().getString(R.string.tip_tips);
if (progressTitle != null && progressTitle.length > 0) {
title = progressTitle[0];
}
ProgressDialog progressDialog = new ProgressDialog(activity);
progressDialog.setTitle(title);
progressDialog.setCancelable(false);
progressDialog.show();
return progressDialog;
}
}
代码示例来源:origin: guolindev/booksource
/**
* 显示进度对话框
*/
private void showProgressDialog() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(getActivity());
progressDialog.setMessage("正在加载...");
progressDialog.setCanceledOnTouchOutside(false);
}
progressDialog.show();
}
代码示例来源:origin: DaxiaK/MyDiary
private void initProgressDialog() {
progressDialog = new ProgressDialog(getActivity());
progressDialog.setMessage(getString(R.string.process_dialog_loading));
progressDialog.setCancelable(false);
progressDialog.setProgressStyle(android.R.style.Widget_ProgressBar);
}
代码示例来源:origin: iMeiji/Toutiao
holder.tv_video_time.setText(tv_video_time);
final ProgressDialog dialog = new ProgressDialog(context);
dialog.setTitle(R.string.loading);
RxView.clicks(holder.itemView)
.throttleFirst(1300, TimeUnit.MILLISECONDS)
.doOnNext(o -> dialog.show())
.observeOn(Schedulers.io())
.switchMap((Function<Object, ObservableSource<String>>) o -> {
})
.subscribe(dataBean -> {
dialog.dismiss();
VideoContentActivity.launch(dataBean);
}, throwable -> {
dialog.dismiss();
ErrorAction.print(throwable);
});
代码示例来源:origin: k9mail/k-9
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Bundle args = getArguments();
String title = args.getString(ARG_TITLE);
String message = args.getString(ARG_MESSAGE);
ProgressDialog dialog = new ProgressDialog(getActivity());
dialog.setIndeterminate(true);
dialog.setTitle(title);
dialog.setMessage(message);
return dialog;
}
代码示例来源:origin: joyoyao/superCleanMaster
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mIndeterminateDrawable = getArguments().getInt("indeterminateDrawable");
mMessage = getArguments().getString("message");
ProgressDialog mProgressDialog = new ProgressDialog(getActivity(),
AlertDialog.THEME_HOLO_LIGHT);
if (mIndeterminateDrawable > 0) {
mProgressDialog.setIndeterminateDrawable(getActivity()
.getResources().getDrawable(mIndeterminateDrawable));
}
if (mMessage != null) {
mProgressDialog.setMessage(mMessage);
}
return mProgressDialog;
}
代码示例来源:origin: stackoverflow.com
ProgressDialog dialog = new ProgressDialog(this);
dialog.setMessage("Thinking...");
dialog.setIndeterminate(true);
dialog.setCancelable(false);
dialog.show();
代码示例来源:origin: WVector/AppUpdate
@SuppressLint("NewApi")
public static void showHorizontalProgressDialog(Activity context, String msg, boolean isShowSize) {
cancel();
if (sHorizontalProgressDialog == null) {
sHorizontalProgressDialog = new ProgressDialog(context);
sHorizontalProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
sHorizontalProgressDialog.setCanceledOnTouchOutside(false);
if (isShowSize)
sHorizontalProgressDialog.setProgressNumberFormat("%2dMB/%1dMB");
}
if (!TextUtils.isEmpty(msg)) {
sHorizontalProgressDialog.setMessage(msg);
}
sHorizontalProgressDialog.show();
}
代码示例来源:origin: DaxiaK/MyDiary
private void initProgressDialog() {
progressDialog = new ProgressDialog(getActivity());
progressDialog.setMessage(getString(R.string.process_dialog_loading));
progressDialog.setCancelable(false);
progressDialog.setProgressStyle(android.R.style.Widget_ProgressBar);
}
代码示例来源:origin: stackoverflow.com
ProgressDialog progress = new ProgressDialog(this);
progress.setMessage("Loading...");
String strAction = "this_is_a_string";
new StartTask(progress, strAction).execute(this);
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
ProgressDialog dlg=new ProgressDialog(getActivity());
dlg.setMessage(getActivity().getString(R.string.dlg_title));
dlg.setIndeterminate(true);
dlg.setProgressStyle(ProgressDialog.STYLE_SPINNER);
return(dlg);
}
代码示例来源:origin: czy1121/update
@Override
public void onStart() {
if (mContext instanceof Activity && !((Activity) mContext).isFinishing()) {
ProgressDialog dialog = new ProgressDialog(mContext);
dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
dialog.setMessage("下载中...");
dialog.setIndeterminate(false);
dialog.setCancelable(false);
dialog.show();
mDialog = dialog;
}
}
代码示例来源:origin: naman14/Timber
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
String username = ((EditText) dialog.findViewById(R.id.lastfm_username)).getText().toString();
String password = ((EditText) dialog.findViewById(R.id.lastfm_password)).getText().toString();
if (username.length() == 0 || password.length() == 0) return;
final ProgressDialog progressDialog = new ProgressDialog(getActivity());
progressDialog.setMessage("Logging in..");
progressDialog.show();
LastFmClient.getInstance(getActivity()).getUserLoginInfo(new UserLoginQuery(username, password), new UserListener() {
@Override
public void userSuccess() {
progressDialog.dismiss();
if (getTargetFragment() instanceof SettingsFragment) {
((SettingsFragment) getTargetFragment()).updateLastFM();
}
}
@Override
public void userInfoFailed() {
progressDialog.dismiss();
Toast.makeText(getTargetFragment().getActivity(), getString(R.string.lastfm_login_failture), Toast.LENGTH_SHORT).show();
}
});
}
}).build();
代码示例来源:origin: stackoverflow.com
switch(id) {
case PROGRESS_DIALOG:
progressDialog = new ProgressDialog(this);
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.setMessage("Loading");
progressDialog.setCancelable(true);
return progressDialog;
default:
代码示例来源:origin: facebook/facebook-android-sdk
photoThumbnail = (ImageView) view.findViewById(R.id.selected_image);
announceProgressDialog = new ProgressDialog(getActivity());
announceProgressDialog.setMessage(getString(R.string.progress_dialog_text));
代码示例来源:origin: TeamNewPipe/NewPipe
@Override
protected void onPreExecute() {
super.onPreExecute();
Activity activity = getActivity();
if (activity != null) {
// Create dialog
progressDialog = new ProgressDialog(activity);
progressDialog.setCancelable(false);
progressDialog.setMessage(activity.getString(R.string.msg_wait));
progressDialog.show();
}
}
代码示例来源:origin: stackoverflow.com
ss2.setSpan(new RelativeSizeSpan(2f), 0, ss2.length(), 0);
ss2.setSpan(new ForegroundColorSpan(Color.GREEN), 0, ss2.length(), 0);
ProgressDialog pd = new ProgressDialog(MainActivity.this);
pd.setTitle(ss1);
pd.setMessage(ss2);
pd.show();
代码示例来源:origin: multidots/android-app-common-tasks
Util.getDisplayDpi(getContext());
mSpinner = new ProgressDialog(getContext());
mSpinner.requestWindowFeature(Window.FEATURE_NO_TITLE);
mSpinner.setMessage("Loading...");
mSpinner.setCancelable(true);
内容来源于网络,如有侵权,请联系作者删除!