Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ShowProgressBar(string title, string message, int max, int progress)
- {
- Device.BeginInvokeOnMainThread(() =>
- {
- dialog = new ProgressDialog(Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity);
- dialog.SetTitle(title);
- //dialog.SetMessage(message);
- dialog.SetProgressStyle(ProgressDialogStyle.Horizontal);
- dialog.Max = max;
- dialog.Progress = 0;
- dialog.Show();
- });
- }
- public void UpdateProgressBar(string message, int max, int progress)
- {
- Device.BeginInvokeOnMainThread(() =>
- {
- if (dialog != null)
- {
- dialog.IncrementProgressBy(progress);
- dialog.SetCanceledOnTouchOutside(false);
- dialog.SetCancelable(false);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement