本文整理汇总了C#中Android.App.ProgressDialog.SetCanceledOnTouchOutside方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressDialog.SetCanceledOnTouchOutside方法的具体用法?C# ProgressDialog.SetCanceledOnTouchOutside怎么用?C# ProgressDialog.SetCanceledOnTouchOutside使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.App.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.SetCanceledOnTouchOutside方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProgressDialogHelper
public ProgressDialogHelper(Context context) {
this.progress = new ProgressDialog(context);
progress.SetProgressStyle(ProgressDialogStyle.Spinner);
progress.Indeterminate = false;
progress.Progress = 99;
progress.SetCanceledOnTouchOutside(false);
}
示例2: ShowProgressDialog
public static ProgressDialog ShowProgressDialog(Activity activity, int messageResId, /*int titleResId,*/ bool allowCancel, ProgressDialogStyle style=ProgressDialogStyle.Spinner)
{
ProgressDialog dialog = new ProgressDialog(activity);
dialog.SetProgressStyle(style);
//dialog.SetTitle(titleResId);
dialog.SetMessage(activity.Resources.GetString(messageResId));
dialog.SetCancelable(allowCancel);
dialog.SetCanceledOnTouchOutside(allowCancel);
dialog.Show();
return dialog;
}
示例3: FindClosestStation
private void FindClosestStation ()
{
if (stations != null) {
Activity.RunOnUiThread (() => {
TaskScheduler scheduler = TaskScheduler.FromCurrentSynchronizationContext ();
progressDialog = new ProgressDialog(Activity);
progressDialog.SetMessage("Buscando estación cercana...");
progressDialog.Show();
closestStationButton.Enabled = false;
progressDialog.SetCanceledOnTouchOutside(false);
progressDialog.SetCancelable(false);
StationGeolocationUtil.CurrentClosestStation (stations, this, scheduler, new Geolocator(Activity));
});
}
}
示例4: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
_flurryClient = new FlurryClient();
_context = this;
_loginError = new TextView(this);
SetContentView(Resource.Layout.loginweblayout);
_endlogin = new TextView(this);
//_messageDialogBuilder = new AlertDialog.Builder(this);
_loginWebView = FindViewById<WebView>(Resource.Id.loginWebView);
_loginWebView.Settings.SavePassword = false;
//_loginWebView.Settings.JavaScriptEnabled = true;
_loginWebView.Settings.PluginsEnabled = true;
_loginWebView.Settings.JavaScriptCanOpenWindowsAutomatically = true;
_loginWebView.SaveEnabled = false;
_loginWebView.SetWebViewClient(new ItsbetaLoginWebViewClient(this));
_loginWebView.SetWebChromeClient(new ItsbetaLoginWebViewChromeClient());
// "https://www.facebook.com/dialog/oauth?response_type=token&display=popup&client_id={0}&redirect_uri={1}&scope={2}",
_loginWebView.LoadUrl(String.Format(
"https://m.facebook.com/dialog/oauth/?response_type=token&" +
"client_id={0}"+
"&redirect_uri={1}" +
"&scope={2}",
//"https://www.facebook.com/dialog/oauth/?response_type=token&display=popup&client_id={0}&redirect_uri={1}&scope={2}",
AppInfo._fbAppId, AppInfo._loginRedirectUri, AppInfo._fbScope));
RelativeLayout progressDialogRelativeLayout = new RelativeLayout(this);
LayoutInflater progressDialoglayoutInflater = (LayoutInflater)BaseContext.GetSystemService(LayoutInflaterService);
View progressDialogView = progressDialoglayoutInflater.Inflate(Resource.Layout.progressdialoglayout, null);
_progressDialogMessage = (TextView)progressDialogView.FindViewById(Resource.Id.progressDialogMessageTextView);
progressDialogRelativeLayout.AddView(progressDialogView);
_progressDialog = new ProgressDialog(this, Resource.Style.FullHeightDialog);
_progressDialog.Show();
_progressDialog.SetContentView(progressDialogRelativeLayout);
_progressDialog.Dismiss();
_progressDialog.Show();
_progressDialog.SetCanceledOnTouchOutside(false);
/////
RelativeLayout errorDialogRelativeLayout = new RelativeLayout(this);
LayoutInflater errorDialoglayoutInflater = (LayoutInflater)BaseContext.GetSystemService(LayoutInflaterService);
View errorDialogView = errorDialoglayoutInflater.Inflate(Resource.Layout.wrongcodedialoglayout, null);
_errorDialogReadyButton = (Button)errorDialogView.FindViewById(Resource.Id.readyButton);
_errorDialogTitle = (TextView)errorDialogView.FindViewById(Resource.Id.textView1);
_errorDialogMessage = (TextView)errorDialogView.FindViewById(Resource.Id.textView2);
errorDialogRelativeLayout.AddView(errorDialogView);
_errorDialog = new Dialog(this, Resource.Style.FullHeightDialog);
_errorDialog.SetTitle("");
_errorDialog.SetContentView(errorDialogRelativeLayout);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
_endlogin.TextChanged += delegate //здесь инициализировать все необходимое перед запуском...
{
Finish();
StartActivity(typeof(FirstBadgeActivity));
};
_loginError.TextChanged += delegate { Finish(); StartActivity(typeof(LoginActivity)); };
}
示例5: DownloadingProgressDialog
public ProgressDialog DownloadingProgressDialog(string title, string message)
{
ProgressDialog progress = new ProgressDialog(context);
progress.SetMessage(message);
progress.SetTitle(title);
progress.SetIcon(Resource.Drawable.Icon);
progress.SetButton("Cancel", (sender, args) =>
{
// Close progress dialog
progress.Dismiss();
// Stop all downloads
client.CancelAsync();
// Remove any language folders that were to be downloaded
for (var i = 0; i < downloadQueue.Count; i++)
{
DeleteLanguagePack(downloadQueue[i]);
}
// No downloads to be downloaded
downloadQueue = new List<string>();
// No files to be download
FilesCoutner = 0;
// They didn't all download, but set to true anyways
allDownloaded = true;
if (DownloadedLanguages.Count > 0)
{
Language = Language;
}
});
progress.SetProgressStyle(ProgressDialogStyle.Horizontal);
progress.SetCancelable(false);
progress.SetCanceledOnTouchOutside(false);
return progress;
}
示例6: CreateProgressDialog
private ProgressDialog CreateProgressDialog(string message, string title = null, bool indeterminate = true)
{
ProgressDialog progressDialog = new ProgressDialog(this) {Indeterminate = indeterminate};
if (indeterminate)
{
progressDialog.SetProgressPercentFormat(new EmptyNumberFormat());
}
progressDialog.SetProgressNumberFormat("");
progressDialog.SetCancelable(false);
progressDialog.SetCanceledOnTouchOutside(false);
progressDialog.SetTitle(title);
progressDialog.SetMessage(message);
progressDialog.SetProgressStyle(ProgressDialogStyle.Horizontal);
return progressDialog;
}