当前位置: 首页>>代码示例>>C#>>正文


C# ProgressDialog.SetTitle方法代码示例

本文整理汇总了C#中Android.App.ProgressDialog.SetTitle方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressDialog.SetTitle方法的具体用法?C# ProgressDialog.SetTitle怎么用?C# ProgressDialog.SetTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Android.App.ProgressDialog的用法示例。


在下文中一共展示了ProgressDialog.SetTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCreateView

        public override Android.Views.View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState)
        {
            //			Console.WriteLine("[{0}] OnCreateView Called: {1}", TAG, DateTime.Now.ToLongTimeString());
            View v = inflater.Inflate(Resource.Layout.fragment_photo, container, false);

            mImageView = v.FindViewById<ImageView>(Resource.Id.photoView);

            photoUrl = Activity.Intent.GetStringExtra(PhotoGalleryFragment.PHOTO_URL_EXTRA);

            photoUrl = photoUrl.Substring(0, photoUrl.Length-6) + ".jpg";
            photoFilename = new FlickrFetchr().GetFilenameFromUrl(photoUrl);

            ProgressDialog pg = new ProgressDialog(Activity);
            pg.SetMessage(Resources.GetString(Resource.String.loading_photo_message));
            pg.SetTitle(Resources.GetString(Resource.String.loading_photo_title));
            pg.SetCancelable(false);
            pg.Show();

            Task.Run(async () => {
                Bitmap image = await new FlickrFetchr().GetImageBitmapAsync(photoUrl, 0, new CancellationTokenSource().Token, photoFilename).ConfigureAwait(false);
                Activity.RunOnUiThread(() => {
                    mImageView.SetImageBitmap(image);
                    //Console.WriteLine("[{0}] File created: {1}", TAG, photoUrl);
                    pg.Dismiss();
                });
            });

            return v;
        }
开发者ID:yingfangdu,项目名称:BNR,代码行数:29,代码来源:PhotoFragment.cs

示例2: Show

		public void Show(Context context, string content, string title)
		{
			var dialog = new ProgressDialog(context);
			dialog.SetMessage(content);
			dialog.SetTitle (title);
			dialog.SetCancelable(false);
			dialog.Show();
			System.Threading.Thread.Sleep (2000);
			dialog.Hide ();
		}
开发者ID:kamilkk,项目名称:MyVote,代码行数:10,代码来源:MessageBox.cs

示例3: ShowProgressDialog

	public static void ShowProgressDialog(Activity context, string msg="Loading",  string title="",bool isCancle=false) {
		if(_mProgressDialog != null)	return;
		
		_mProgressDialog = new ProgressDialog(context);
		_mProgressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
		_mProgressDialog.SetTitle(title);
        _mProgressDialog.SetMessage(msg);
        _mProgressDialog.SetCancelable(isCancle);
	    if (!context.IsFinishing)
	    {
	        _mProgressDialog.Show();
	    }
	}
开发者ID:Xushlin,项目名称:Xamarin-For-Android,代码行数:13,代码来源:DialogUitls.cs

示例4: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView (Resource.Layout.ListImages);
            String tagService = Intent.GetStringExtra ("TagService");

            gallery = (Gallery)FindViewById <Gallery> (Resource.Id.gallery);
            images = new List<Bitmap> ();

            progressDialog = new ProgressDialog(this) { Indeterminate = true };
            progressDialog.SetTitle("Carga de Datos");
            progressDialog.SetMessage("Wait");

            searchImagesByTag (tagService);
        }
开发者ID:janfranco27,项目名称:PhotoSharing-AndroidClient,代码行数:15,代码来源:ResultActivity.cs

示例5: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            _loginService = new LoginService();
            _progressDialog = new ProgressDialog(this) { Indeterminate = true };
            _progressDialog.SetTitle("Login In Progress");
            _progressDialog.SetMessage("Please wait...");

            loginSynchronously();
            //loginWithThread();
            //loginWithJavaThread();
            //loginWithThreadPool();
            //loginWithAsyncTask();
            //loginWithTaskLibrary();
        }
开发者ID:jorik041,项目名称:Sample-Projects,代码行数:16,代码来源:DemoActivity.cs

示例6: OnCreate

        protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

            SetContentView (Resource.Layout.Main);

            Presenter = new TwitterPresenter(this, new TwitterRepoImpl());

            TwitterList = FindViewById<ListView> (Resource.Id.twitterList);

            NoTweetsLabel = FindViewById<TextView>(Resource.Id.noTweetsMessage);

            progressDialog = new ProgressDialog(this);
            progressDialog.SetTitle("Loading Tweets");

            Presenter.LoadFeed();
		}
开发者ID:cloudface,项目名称:xamarin_noser_demo,代码行数:17,代码来源:MainActivity.cs

示例7: InitializeProgressDialog

        // Initializes a simple progress dialog that gets presented while the app is communicating with the server.
        private void InitializeProgressDialog()
        {
            progressDialog?.Dismiss();

            progressDialog = new ProgressDialog(this);
            progressDialog.Indeterminate = true;
            progressDialog.SetTitle(GetString(Resource.String.please_wait));
            progressDialog.SetCancelable(true);
            progressDialog.CancelEvent += delegate
            {
                Finish();
            };
        }
开发者ID:mattleibow,项目名称:shopify-bindings,代码行数:14,代码来源:SampleActivity.cs

示例8: OnCreate

        protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            // Prepare the view
            SetContentView (Resource.Layout.StockChartActivityLayout);

            // Create and show the progress dialog
            _progressDialog = new ProgressDialog (this);
            _progressDialog.SetTitle ("Retrieving Data...");
            _progressDialog.SetMessage ("Please wait");
            _progressDialog.SetCancelable (false);
            _progressDialog.Show ();

            // Manage the updates of the presenter and application
            var app = ShinobiStockChartApplication.GetApplication (this);
            app.CurrentActivity = this;
            _presenter = app.Presenter as StockChartPresenter;
            _presenter.SetView (this);

            // Get the chart and configure it
            var chartFrag = FragmentManager.FindFragmentById<ChartFragment> (Resource.Id.chart);
            _chart = chartFrag.ShinobiChart;
            _chart.SetLicenseKey ("<PUT YOUR LICENSE KEY HERE>");

            _chart.XAxis = new DateTimeAxis ();
            _chart.XAxis.EnableGestures ();
            _chart.YAxis = new NumberAxis ();
            _chart.YAxis.EnableGestures ();

            // Set the style
            _chart.Style.BackgroundColor = Resources.GetColor (Resource.Color.chart_background);
            _chart.Style.CanvasBackgroundColor = Color.Transparent;
            _chart.Style.PlotAreaBackgroundColor = Color.Transparent;
            _chart.XAxis.Style.LineColor = Resources.GetColor (Resource.Color.chart_axis);
            _chart.YAxis.Style.LineColor = Resources.GetColor (Resource.Color.chart_axis);
            _chart.XAxis.Style.TickStyle.LabelColor = Resources.GetColor (Resource.Color.chart_axis);
            _chart.YAxis.Style.TickStyle.LabelColor = Resources.GetColor (Resource.Color.chart_axis);
            _chart.XAxis.Style.TickStyle.LineColor = Resources.GetColor (Resource.Color.chart_axis);
            _chart.YAxis.Style.TickStyle.LineColor = Resources.GetColor (Resource.Color.chart_axis);

            // Set the title
            if (_chartTitle != null) {
                FindViewById<TextView> (Resource.Id.symbolTextView).Text = _chartTitle;
            }

            // Enable the home button
            ActionBar.SetDisplayHomeAsUpEnabled (true);
            ActionBar.SetHomeButtonEnabled (true);
            ActionBar.Title = _presenter.Title;
        }
开发者ID:ColinEberhardt,项目名称:Xamarin-cross-platform-charting,代码行数:51,代码来源:StockChartActivity.cs

示例9: DeleteMessage

        private void DeleteMessage(MessageListItem selectedMessage)
        {
            _progressDialog = new ProgressDialog(Activity);
            _progressDialog.SetTitle ("Delete Message");
            _progressDialog.SetMessage (string.Format ("Deleting Message with {0} recipients.  Please wait...", selectedMessage.RecipientCount));
            _progressDialog.Show ();

            Task.Factory
                .StartNew(() => {
                    var messages = _messageRepo.GetAllForEvent (selectedMessage.SmsGroup.Id, selectedMessage.DateSent, selectedMessage.Text);
                    messages.ForEach (message => _messageRepo.Delete (message));
                })
                .ContinueWith(task =>
                    Activity.RunOnUiThread(() => {
                        _sortedItems = GetGroupedMessages (20);
                        ListAdapter = new MessageListAdapter(Activity, _sortedItems);
                        ((BaseAdapter)ListAdapter).NotifyDataSetChanged ();
                        _progressDialog.Dismiss ();
                }));
        }
开发者ID:kimsama,项目名称:Prattle,代码行数:20,代码来源:SmsHistoryFragment.cs

示例10: ExportRecordings

        /// <summary>
        /// Exports the recordings into a zip and marks them as being ready to upload
        /// </summary>
        private async void ExportRecordings()
        {
            // Compress exported recordings into zip (Delete existing zip first)
            File.Delete(resultsZipPath);

            ProgressDialog progressDialog;
            AppCompatDialog ratingsDialog = null;
            AppCompatDialog commentDialog = null;

            bool rated = false;

            RunOnUiThread(() =>
            {
                progressDialog = new ProgressDialog(this);
                progressDialog.SetTitle("Scenario Complete!");
                progressDialog.SetMessage("Getting your recordings ready to upload...");

                commentDialog = new Android.Support.V7.App.AlertDialog.Builder(this)
                    .SetTitle("Ask for feedback")
                    .SetMessage("If you'd like feedback on anything specific, ask your question in the box below.")
                    .SetView(Resource.Layout.FeedbackDialog)
                    .SetCancelable(false)
                     .SetPositiveButton("Done", (par1, par2) =>
                     {
                         progressDialog.Show();
                         EditText textInput = commentDialog.FindViewById<EditText>(Resource.Id.dialogTextField);
                         results.FeedbackQuery = textInput.Text;
                         rated = true;
                     })
                    .Create();

                ratingsDialog = new Android.Support.V7.App.AlertDialog.Builder(this)
                    .SetTitle("Scenario Complete!")
                    .SetMessage("How confident are you that you've spoken clearly?")
                    .SetView(Resource.Layout.RatingDialog)
                    .SetCancelable(false)
                    .SetPositiveButton("Done", (par1, par2) =>
                    {
                        // ReSharper disable once PossibleNullReferenceException
                        // ReSharper disable once AccessToModifiedClosure
                        RatingBar rating = ratingsDialog.FindViewById<RatingBar>(Resource.Id.dialogRatingBar);
                        results.UserRating = rating.Rating;
                        commentDialog.Show();
                    })
                    .Create();

                ratingsDialog.Show();
            });

            try
            {
                FastZip fastZip = new FastZip();
                fastZip.CreateZip(resultsZipPath, localTempDirectory, true, null);

                // Clean up zipped files
                string[] toDel = Directory.GetFiles(localTempDirectory);

                foreach (string path in toDel)
                {
                    if (path == resultsZipPath) continue;
                    File.Delete(path);
                }

                while (!rated)
                {
                    await Task.Delay(200);
                }

                results.CompletionDate = DateTime.Now;
                AppData.Session.ResultsToUpload.Add(results);
                AppData.SaveCurrentData();

                StartActivity(typeof (UploadsActivity));
                Finish();
            }
            catch (Exception except)
            {
                Console.Write(except.Message);
            }
        }
开发者ID:GSDan,项目名称:Speeching_Client,代码行数:83,代码来源:ScenarioActivity.cs

示例11: OnOptionsItemSelected

        public IMenuItem OnOptionsItemSelected(IMenuItem item, EditDetailFragment fragment, View viewEditDetail, Presentation presentation)
        {
            Logging.Log (this, Logging.LoggingTypeDebug, "OnOptionsItemSelected()");

            switch((ActionBarButtons)item.ItemId)
            {
            case ActionBarButtons.SelectPresentation:
                fragment.Activity.RunOnUiThread(() => {
                    EditActivity editActivity = context as EditActivity;

                    if (editActivity != null)
                        editActivity.ShowPresentationSelection();

                    fragment.SetHasOptionsMenu(false);
                });
                break;

            case ActionBarButtons.Save:
                if (presentation != null)
                {
                    SavePresentation(fragment, viewEditDetail, presentation);
                    Toast.MakeText(fragment.Activity, Resource.String.ToastPresentationSaved, ToastLength.Long).Show();
                }
                break;

            case ActionBarButtons.Render:
                // Async Daten Asyncron rendern lassen
                ProgressDialog pdlg = new ProgressDialog(fragment.Activity);
                pdlg.SetCancelable(false);
                pdlg.SetTitle(fragment.GetText(Resource.String.ProgressRenderPresentation));
                pdlg.SetMessage(fragment.GetText(Resource.String.PleaseWait));
                pdlg.Show();

                Task.Factory.StartNew(() => {
                    return new WSRenderGoogleIO2012(this.context).RenderPresentation(presentation.PresentationUID);
                }).ContinueWith(t => {
                    pdlg.Cancel();

                    if (t.Exception == null && t.Result)
                        Toast.MakeText(fragment.Activity, Resource.String.ToastPresentationRendered, ToastLength.Long).Show();
                    else
                    {
                        fragment.Activity.RunOnUiThread(delegate() {
                            ((BaseActivity)fragment.Activity).ShowErrorMsg(fragment.GetText(Resource.String.ToastErrorRenderPresentation));
                        });
                    }
                }, TaskScheduler.FromCurrentSynchronizationContext());
                break;

            case ActionBarButtons.Present:
                StartPresentation(fragment, presentation);
                break;
            }

            return item;
        }
开发者ID:00091701,项目名称:FullscreenPresentation-Mono,代码行数:56,代码来源:GoogleIO2012Helper.cs

示例12: FinishAssessment

        private async void FinishAssessment()
        {
            currentStage = AssessmentStage.Finished;
            ProgressDialog progress;
            AppCompatDialog ratingsDialog = null;
            bool rated = false;

            RunOnUiThread(() =>
            {
                progress = new ProgressDialog(this);
                progress.SetTitle("Assessment Complete!");
                progress.SetMessage("Getting your recordings ready to upload...");

                ratingsDialog = new Android.Support.V7.App.AlertDialog.Builder(this)
                    .SetTitle("Assessment Complete!")
                    .SetMessage("How do you feel you did?")
                    .SetView(Resource.Layout.RatingDialog)
                    .SetCancelable(false)
                    .SetPositiveButton("Done", (par1, par2) =>
                    {
                        // ReSharper disable once PossibleNullReferenceException
                        // ReSharper disable once AccessToModifiedClosure
                        RatingBar rating = ratingsDialog.FindViewById<RatingBar>(Resource.Id.dialogRatingBar);
                        results.UserRating = rating.Rating;
                        progress.Show();
                        rated = true;
                    })
                    .Create();

                ratingsDialog.Show();
            });

            FastZip fastZip = new FastZip();
            fastZip.CreateZip(zipPath, localTempDirectory, true, null);
            Directory.Delete(localTempDirectory, true);

            while (!rated)
            {
                await Task.Delay(200);
            }

            results.CompletionDate = DateTime.Now;
            AppData.Session.ResultsToUpload.Add(results);
            AppData.SaveCurrentData();
            StartActivity(typeof (UploadsActivity));
            Finish();
        }
开发者ID:GSDan,项目名称:Speeching_Client,代码行数:47,代码来源:AssessmentActivity.cs

示例13: 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;
        }
开发者ID:GuyMicciche,项目名称:SuperNWTBible,代码行数:38,代码来源:App.cs

示例14: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            BindService ();

            SetContentView(Resource.Layout.SendMessage);
            ActionBar.SetDisplayHomeAsUpEnabled (true);

            var groupId = Intent.GetIntExtra("groupId", 0);
            _smsGroupRepo = new SmsGroupRepository();
            _smsGroup = _smsGroupRepo.Get (groupId);

            _contactRepo = new ContactRepository(this);
            _recipients = _contactRepo.GetMembersForSmsGroup (groupId);

            FindViewById <TextView>(Resource.Id.recipientGroup).Text = _smsGroup.Name;
            FindViewById <TextView>(Resource.Id.recipients).Text = string.Join (", ", _recipients.Select (c => c.Name));
            FindViewById <ImageButton>(Resource.Id.cmdSend).Click += (sender, e) =>
                {
                    _progressDialog = new ProgressDialog(this);
                    _progressDialog.SetTitle ("Sending Messages");
                    _progressDialog.SetMessage ("Please wait.  Sending message to recipients in group...");

                    Task.Factory
                        .StartNew(() =>
                            QueueMessage ())
                        .ContinueWith(task =>
                            RunOnUiThread(() => {
                                if (task.Result)
                                {
                                    new AlertDialog.Builder(this)
                                        .SetTitle ("Messages Queued")
                                        .SetMessage (string.Format ("Your message was queued to be sent to each recipient of the '{0}' group",
                                                                    _smsGroup.Name))
                                        .SetPositiveButton ("Ok", (o, args) => {
                                                    var homeIntent = new Intent();
                                                    homeIntent.PutExtra ("defaultTab", 0);
                                                    homeIntent.AddFlags (ActivityFlags.ClearTop);
                                                    homeIntent.SetClass (this, typeof(MainActivity));
                                                    StartActivity(homeIntent);
                                                })
                                        .Show ();
                                }
                                else
                                {
                                    new AlertDialog.Builder(this)
                                        .SetTitle ("Message Error")
                                        .SetMessage (string.Format ("Doh!  Your message could not be sent to the '{0}' group.",
                                                                    _smsGroup.Name))
                                        .Show ();
                                }
                                _progressDialog.Dismiss ();
                            }));
                };
        }
开发者ID:jheerman,项目名称:Prattle,代码行数:56,代码来源:SendMessageActivity.cs

示例15: OnCreateDialog

        public override Dialog OnCreateDialog(Bundle savedInstanceState)
        {
            ProgressDialog dialog = new ProgressDialog (Activity);

            dialog.SetTitle (Resource.String.dialogtitle);
            dialog.SetMessage (GetString (Resource.String.dialogmessage));
            dialog.Indeterminate = true;
            dialog.SetCancelable (false);

            return dialog;
        }
开发者ID:yofanana,项目名称:recipes,代码行数:11,代码来源:MainActivity.cs


注:本文中的Android.App.ProgressDialog.SetTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。