本文整理了Java中android.app.ProgressDialog.setCanceledOnTouchOutside()
方法的一些代码示例,展示了ProgressDialog.setCanceledOnTouchOutside()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setCanceledOnTouchOutside()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:setCanceledOnTouchOutside
暂无
代码示例来源:origin: stackoverflow.com
ProgressDialog dialog = new ProgressDialog(WiFiFinderActivity.this);
dialog.setMessage("please wait...");
dialog.show();
dialog.setCancelable(false);
dialog.setCanceledOnTouchOutside(false);
代码示例来源:origin: Justson/AgentWeb
@Override
public void onLoading(String msg) {
if (mProgressDialog == null) {
mProgressDialog = new ProgressDialog(mActivity);
}
mProgressDialog.setCancelable(false);
mProgressDialog.setCanceledOnTouchOutside(false);
mProgressDialog.setMessage(msg);
mProgressDialog.show();
}
代码示例来源:origin: guolindev/booksource
/**
* 显示进度对话框
*/
private void showProgressDialog() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(getActivity());
progressDialog.setMessage("正在加载...");
progressDialog.setCanceledOnTouchOutside(false);
}
progressDialog.show();
}
代码示例来源:origin: stackoverflow.com
ProgressDialog dialog = new ProgressDialog(this); // this = YourActivity
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage("Loading. Please wait...");
dialog.setIndeterminate(true);
dialog.setCanceledOnTouchOutside(false);
dialog.show();
代码示例来源:origin: TommyLemon/APIJSON
@Override
public void run() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(context);
}
if(progressDialog.isShowing() == true) {
progressDialog.dismiss();
}
if (dialogTitle != null && ! "".equals(dialogTitle.trim())) {
progressDialog.setTitle(dialogTitle);
}
if (dialogMessage != null && ! "".equals(dialogMessage.trim())) {
progressDialog.setMessage(dialogMessage);
}
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.show();
}
});
代码示例来源:origin: TommyLemon/Android-ZBLibrary
@Override
public void run() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(context);
}
if(progressDialog.isShowing() == true) {
progressDialog.dismiss();
}
if (dialogTitle != null && ! "".equals(dialogTitle.trim())) {
progressDialog.setTitle(dialogTitle);
}
if (dialogMessage != null && ! "".equals(dialogMessage.trim())) {
progressDialog.setMessage(dialogMessage);
}
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.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: MindorksOpenSource/android-mvp-architecture
public static ProgressDialog showLoadingDialog(Context context) {
ProgressDialog progressDialog = new ProgressDialog(context);
progressDialog.show();
if (progressDialog.getWindow() != null) {
progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
}
progressDialog.setContentView(R.layout.progress_dialog);
progressDialog.setIndeterminate(true);
progressDialog.setCancelable(false);
progressDialog.setCanceledOnTouchOutside(false);
return progressDialog;
}
代码示例来源:origin: stackoverflow.com
private ProgressDialog dialog = new ProgressDialog(WebActivity.this);
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
webView = (WebView) findViewById(R.id.webView1);
Bundle extras = getIntent().getExtras();
String url=extras.getString("adres");
webView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
if (dialog.isShowing()) {
dialog.dismiss();
}
}
});
dialog.setMessage("Loading..Please wait.");
dialog.setCanceledOnTouchOutside(false);
dialog.show();
webView.loadUrl(url);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
}
代码示例来源:origin: TommyLemon/Android-ZBLibrary
@Override
public void run() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(context);
}
if(progressDialog.isShowing()) {
progressDialog.dismiss();
}
if (StringUtil.isNotEmpty(title, false)) {
progressDialog.setTitle(title);
}
if (StringUtil.isNotEmpty(message, false)) {
progressDialog.setMessage(message);
}
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.show();
}
});
代码示例来源:origin: stackoverflow.com
super.onPreExecute();
dialog.setMessage("Please wait...");
dialog.setCanceledOnTouchOutside(false);
dialog.show();
代码示例来源:origin: TommyLemon/APIJSON
@Override
public void run() {
if (pbBaseTitle != null) {
pbBaseTitle.setVisibility(View.VISIBLE);
String s = tvBaseTitle == null ? null : StringUtil.isNotEmpty(message, false) ? message : title;
if (StringUtil.isNotEmpty(s, true)) {
tvBaseTitle.setText(s);
}
return;
}
if (progressDialog == null) {
progressDialog = new ProgressDialog(context);
}
if(progressDialog.isShowing()) {
progressDialog.dismiss();
}
if (StringUtil.isNotEmpty(title, false)) {
progressDialog.setTitle(title);
}
if (StringUtil.isNotEmpty(message, false)) {
progressDialog.setMessage(message);
}
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.show();
}
});
代码示例来源:origin: GitLqr/LQRWeChat
progressDialog.setCanceledOnTouchOutside(false);
RedPacketInfo redPacketInfo = new RedPacketInfo();
redPacketInfo.redPacketId = redPacketId;
代码示例来源:origin: facebook/facebook-android-sdk
spinner.setMessage(getContext().getString(R.string.com_facebook_loading));
spinner.setCanceledOnTouchOutside(false);
spinner.setOnCancelListener(new OnCancelListener() {
@Override
代码示例来源:origin: pili-engineering/PLDroidShortVideo
mProcessingDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mProcessingDialog.setCancelable(false);
mProcessingDialog.setCanceledOnTouchOutside(false);
mProcessingDialog.setMessage("正在生成");
代码示例来源:origin: sendtion/XRichText
insertDialog.setCanceledOnTouchOutside(false);
loadingDialog.setCanceledOnTouchOutside(false);
loadingDialog.show();
代码示例来源:origin: sendtion/XRichText
loadingDialog.setCanceledOnTouchOutside(false);
loadingDialog.show();
代码示例来源:origin: huangfangyi/YiChat
private void send(String content) {
dialog = new ProgressDialog(this);
dialog.setCanceledOnTouchOutside(false);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage(getString(R.string.publishing));
dialog.show();
if (TextUtils.isEmpty(mylocation)) {
mylocation = "0";
}
compressMore(pathList);
}
代码示例来源:origin: huntermr/FastAndroid
private void showLoading(boolean flag, String message) {
if (mProgressDialog == null) {
mProgressDialog = new CustomProgress(this, R.style.CustomDialog);
mProgressDialog.setCanceledOnTouchOutside(false);
}
mProgressDialog.setCancelable(flag);
mProgressDialog.setMessage(message);
if(!mProgressDialog.isShowing()){
mProgressDialog.show();
}
}
代码示例来源:origin: burgessjp/GanHuoIO
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mContentView = inflater.inflate(setLayoutResourceID(), container, false);//setContentView(inflater, container);
mContext = getContext();
mProgressDialog = new ProgressDialog(getMContext());
mProgressDialog.setCanceledOnTouchOutside(false);
init();
setUpView();
setUpData();
return mContentView;
}
内容来源于网络,如有侵权,请联系作者删除!