本文整理了Java中android.app.ProgressDialog.setMessage()
方法的一些代码示例,展示了ProgressDialog.setMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setMessage()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:setMessage
暂无
代码示例来源: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: stackoverflow.com
ProgressDialog mDialog = new ProgressDialog(getApplicationContext());
mDialog.setMessage("Please wait...");
mDialog.setCancelable(false);
mDialog.show();
代码示例来源:origin: stackoverflow.com
private ProgressDialog pdia;
@Override
protected void onPreExecute(){
super.onPreExecute();
pdia = new ProgressDialog(yourContext);
pdia.setMessage("Loading...");
pdia.show();
}
@Override
protected void onPostExecute(String result){
super.onPostExecute(result);
pdia.dismiss();
}
代码示例来源:origin: guolindev/booksource
/**
* 显示进度对话框
*/
private void showProgressDialog() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(getActivity());
progressDialog.setMessage("正在加载...");
progressDialog.setCanceledOnTouchOutside(false);
}
progressDialog.show();
}
代码示例来源:origin: stackoverflow.com
ProgressDialog pd = new ProgressDialog(yourActivity.this);
pd.setMessage("loading");
pd.show();
代码示例来源:origin: stackoverflow.com
ProgressDialog mProgressDialog = new ProgressDialog(Your_Activity.this);
mProgressDialog.setMessage("Here you can set a message");
mProgressDialog.setIndeterminate(false);
mProgressDialog.setMax(100);
mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
mProgressDialog.show();
MyAsyncTask obj = new MyAsyncTask ();
obj.execute("url");
代码示例来源: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: stackoverflow.com
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
final ProgressDialog dialog = new ProgressDialog(getActivity());
//
dialog.setTitle(R.string.login_title);
dialog.setMessage(getString(R.string.login_message));
dialog.setIndeterminate(true);
dialog.setCancelable(false);
// etc...
return dialog;
}
代码示例来源: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: 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: stackoverflow.com
protected void onPreExecute()
Dialog.setMessage("Doing something...");
Dialog.show();
Dialog.dismiss();
代码示例来源: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: stackoverflow.com
ProgressDialog mDialog = new ProgressDialog(getApplicationContext());
mDialog.setMessage("Loading...");
mDialog.setCancelable(false);
mDialog.show();
代码示例来源:origin: stackoverflow.com
ProgressDialog progress = new ProgressDialog(this);
progress.setMessage("Loading...");
String strAction = "this_is_a_string";
new StartTask(progress, strAction).execute(this);
代码示例来源:origin: stackoverflow.com
class MyAsyncTask extends AsyncTask<String, String, Void> {
private ProgressDialog progressDialog = new ProgressDialog(MainActivity.this);
InputStream inputStream = null;
String result = "";
protected void onPreExecute() {
progressDialog.setMessage("Downloading your data...");
progressDialog.show();
progressDialog.setOnCancelListener(new OnCancelListener() {
public void onCancel(DialogInterface arg0) {
MyAsyncTask.this.cancel(true);
}
});
}
代码示例来源:origin: stackoverflow.com
progressDialog.setMessage("Fetching route, Please wait...");
progressDialog.setIndeterminate(true);
progressDialog.show();
代码示例来源: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;
}
}
内容来源于网络,如有侵权,请联系作者删除!