本文整理了Java中android.app.ProgressDialog.setCancelable()
方法的一些代码示例,展示了ProgressDialog.setCancelable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setCancelable()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:setCancelable
暂无
代码示例来源: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 mDialog = new ProgressDialog(getApplicationContext());
mDialog.setMessage("Please wait...");
mDialog.setCancelable(false);
mDialog.show();
代码示例来源: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: stackoverflow.com
public class WebViewDemo extends Activity {
private WebView webView;
Activity activity ;
private ProgressDialog progDailog;
@SuppressLint("NewApi")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
activity = this;
progDailog = ProgressDialog.show(activity, "Loading","Please wait...", true);
progDailog.setCancelable(false);
webView = (WebView) findViewById(R.id.webview_compontent);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setUseWideViewPort(true);
webView.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
progDailog.show();
view.loadUrl(url);
return true;
}
@Override
public void onPageFinished(WebView view, final String url) {
progDailog.dismiss();
}
});
webView.loadUrl("http://www.teluguoneradio.com/rssHostDescr.php?hostId=147");
}
代码示例来源: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: stackoverflow.com
public static ProgressDialog createProgressDialog(Context mContext) {
ProgressDialog dialog = new ProgressDialog(mContext);
try {
dialog.show();
} catch (BadTokenException e) {
}
dialog.setCancelable(false);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.setContentView(R.layout.progressdialog);
// dialog.setMessage(Message);
return dialog;
}
代码示例来源:origin: stackoverflow.com
myProgressDialog.dismiss();
myProgressDialog.setCancelable(true);
代码示例来源:origin: stackoverflow.com
ProgressDialog dialog = new ProgressDialog(this);
dialog.setMessage("Thinking...");
dialog.setIndeterminate(true);
dialog.setCancelable(false);
dialog.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 mDialog = new ProgressDialog(getApplicationContext());
mDialog.setMessage("Loading...");
mDialog.setCancelable(false);
mDialog.show();
代码示例来源:origin: ankidroid/Anki-Android
@SuppressWarnings("deprecation") // ProgressDialog change tracked in github as #5020
protected void translate() {
if(!Connection.isOnline()) {
showToast(gtxt(R.string.network_no_connection));
return;
}
progressDialog = android.app.ProgressDialog.show(this, getText(R.string.multimedia_editor_progress_wait_title),
getText(R.string.multimedia_editor_trans_translating_online), true, false);
progressDialog.setCancelable(true);
progressDialog.setOnCancelListener(this);
mWebServiceAddress = computeAddress();
try {
mTranslationLoadPost = new BackgroundPost();
mTranslationLoadPost.execute();
} catch (Exception e) {
progressDialog.dismiss();
showToast(getText(R.string.multimedia_editor_something_wrong));
}
}
代码示例来源:origin: stackoverflow.com
progressDialog = gimmeOne(ctx);
progressDialog.setCancelable(true);
progressDialog.setOnCancelListener(new OnCancelListener() {
@Override
progressDialog.show();
代码示例来源: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: 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: stackoverflow.com
ProgressDialog dialog = new ProgressDialog(WiFiFinderActivity.this);
dialog.setMessage("please wait...");
dialog.show();
dialog.setCancelable(false);
dialog.setCanceledOnTouchOutside(false);
代码示例来源:origin: ankidroid/Anki-Android
@SuppressWarnings("deprecation") // ProgressDialog change tracked in github as #5020
private void showProgressDialog(String message) {
dismissCarefullyProgressDialog();
progressDialog = android.app.ProgressDialog.show(this, gtxt(R.string.multimedia_editor_progress_wait_title), message, true,
false);
progressDialog.setCancelable(true);
progressDialog.setOnCancelListener(this);
}
代码示例来源: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: multidots/android-app-common-tasks
Util.getDisplayDpi(getContext());
mSpinner = new ProgressDialog(getContext());
mSpinner.requestWindowFeature(Window.FEATURE_NO_TITLE);
mSpinner.setMessage("Loading...");
mSpinner.setCancelable(true);
代码示例来源:origin: stackoverflow.com
ProgressDialog dialog=new ProgressDialog(context);
dialog.setMessage("message");
dialog.setCancelable(false);
dialog.setInverseBackgroundForced(false);
dialog.show();
内容来源于网络,如有侵权,请联系作者删除!