Ejemplo n.º 1
0
		/// <summary>
		/// 停止 the progress dialog.
		/// </summary>
		public static void StopProgressDialog()
		{
			if (progressDialog != null && progressDialog.IsShowing)
				progressDialog.Dismiss ();
			progressDialog = null;

		}
		public static CustomProgressDialog createDialog(Context context){
			customProgressDialog = new CustomProgressDialog (context, Resource.Style.CustomProgressDialog);
			customProgressDialog.SetContentView(Resource.Layout.customprogressdialog);
			customProgressDialog.Window.Attributes.Gravity = Android.Views.GravityFlags.Center;
			return customProgressDialog;

		}
Ejemplo n.º 3
0
 public static CustomProgressDialog createDialog(Context context)
 {
     customProgressDialog = new CustomProgressDialog(context, Resource.Style.CustomProgressDialog);
     customProgressDialog.SetContentView(Resource.Layout.customprogressdialog);
     customProgressDialog.Window.Attributes.Gravity = Android.Views.GravityFlags.Center;
     return(customProgressDialog);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 停止 the progress dialog.
 /// </summary>
 public static void StopProgressDialog()
 {
     if (progressDialog != null && progressDialog.IsShowing)
     {
         progressDialog.Dismiss();
     }
     progressDialog = null;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 启动 progress dialog.
 /// </summary>
 /// <param name="context">Context.</param>
 /// <param name="msg">Message.</param>
 public static void StartProgressDialog(Activity activity, string msg, bool canceleable = false)
 {
     progressDialog = CustomProgressDialog.createDialog(activity);
     progressDialog.Window.SetGravity(GravityFlags.Center);
     progressDialog.SetMessage(msg);
     progressDialog.Show();
     progressDialog.SetCancelable(canceleable);
 }
Ejemplo n.º 6
0
		/// <summary>
		/// 启动 progress dialog.
		/// </summary>
		/// <param name="context">Context.</param>
		/// <param name="msg">Message.</param>
		public static void StartProgressDialog(Activity activity,string msg,bool canceleable =false)
		{
			progressDialog = CustomProgressDialog.createDialog (activity);
			progressDialog.Window.SetGravity (GravityFlags.Center); 
			progressDialog.SetMessage (msg);
			progressDialog.Show ();
			progressDialog.SetCancelable (canceleable);

		}